createAuthRequest
Send the result as parameters to the server at OAuth2AuthorizationServerMetadata.authorizationEndpoint. Use POST if OAuth2AuthorizationServerMetadata.pushedAuthorizationRequestEndpoint is available.
Wraps the actual authorization request in a pushed authorization request (i.e. the request property), if the signPushedAuthorizationRequest is available.
Sample ktor code for GET:
val authnRequest = client.createAuthRequest(...)
httpClient.get(issuerMetadata.authorizationEndpointUrl!!) {
url {
authnRequest.encodeToParameters().forEach { parameters.append(it.key, it.value) }
}
}Sample ktor code for POST:
val authnRequest = client.createAuthRequest(...)
httpClient.submitForm(
url = issuerMetadata.pushedAuthorizationRequestEndpoint,
formParameters = parameters {
authnRequest.encodeToParameters().forEach { append(it.key, it.value) }
}
)Parameters
to keep internal state in further requests
in OID4VCI flows the value scope from IssuerMetadata.supportedCredentialConfigurations
from RFC 9396 OAuth 2.0 Rich Authorization Requests
from RFC 8707 Resource Indicators for OAuth 2.0, in OID4VCI flows the value of IssuerMetadata.credentialIssuer
for OID4VCI flows the value from CredentialOfferGrantsAuthCode.issuerState