UserAssertion Class

  • java.lang.Object
    • com.microsoft.aad.msal4j.UserAssertion

Implements

public class UserAssertion
implements IUserAssertion

Credential type containing an assertion representing a delegated user identity. Used as a parameter in OnBehalfOfParameters

Constructor Summary

Constructor Description
UserAssertion(String assertion)

Constructor to create credential with a jwt token encoded as a base64 url encoded string.

Method Summary

Modifier and Type Method and Description
java.lang.String getAssertion()

Gets the assertion.

java.lang.String getAssertionHash()

Gets a hash of the assertion token.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

UserAssertion

public UserAssertion(String assertion)

Constructor to create credential with a jwt token encoded as a base64 url encoded string.

Parameters:

assertion - The jwt used as credential.

Method Details

getAssertion

public String getAssertion()

Gets the assertion.

Returns:

assertion

getAssertionHash

public String getAssertionHash()

Gets a hash of the assertion token.

This hash is used as a key for caching tokens acquired via the On-Behalf-Of flow, allowing the application to efficiently retrieve tokens for the same user assertion without making redundant requests to the token service.

Returns:

Base64 encoded SHA256 hash of the assertion

Applies to