create Authorization Session
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 DiscoveredCredentialOffer object.
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.
Return
An Authorization Session object containing the decoded offer and authorization URL.
Parameters
URL-encoded credential offer. It is received from the issuer, e.g., using the QR code. Currently only offer by value is supported.
The identifier that is registered with the issuer as a trusted wallet application.
Throws
If the SDK is not initialized before calling this function. See: initialize.
If there was a network connection issue during any network call in this function.
If the credentialOffer is invalid or malformed.
If the credential offer discovery process fails for any reason, other than those listed above. For instance, if there was an unexpected response from the server when requesting the issuer's metadata.
If the offer can be used only with Authorization Code Flow, but the redirect URI was not specified during the SDK initialization.
If the credential offer discovery process fails for any reason, other than those listed above. For instance, if there was an unexpected response from the server when requesting the issuer's metadata.