Functions
createAuthorizationSession
- Parses the
credentialOffer. - Fetches the metadata of the OpenID4VCI issuer, specified in the offer.
- Validates the offer against the issuer's metadata, and builds the
DiscoveredCredentialOfferobject. - Generates the authorization request
and returns the
AuthorizationSession.
The AuthorizationSession object contains the AuthorizationSession#authorizeUrl which can
be used to start the credential issuance flow. Use this function in conjunction with
retrieveCredentials. This function should only be used for Authorization Code Flow.
Signature
function createAuthorizationSession(
options: CreateAuthorizationSessionOptions
): Promise<Result<AuthorizationSession, MobileCredentialHolderError<CreateAuthorizationSessionErrorType>>>Parameters
Prop
Type
Returns
Promise<Result<AuthorizationSession, MobileCredentialHolderError<CreateAuthorizationSessionErrorType>>>
An Authorization Session object containing the decoded offer and authorization URL.
Throws
InvalidParams if the provided arguments are missing or invalid.
MobileCredentialHolderErrorType.SdkNotInitialized if the SDK has not been initialized.
How would you rate this page?