authenticate

open suspend override fun authenticate(idp: String, keyAuth: String, acmeAud: String): String(source)

Authenticate with the user's identity provider (IdP)

The implementation should perform an authentication using the authorization code flow (https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth) with the PKCE (https://www.rfc-editor.org/rfc/rfc7636) extension. As part of the authorization request, the implementation should specify key_auth and acme_aud claims, along with their values, in the claims parameter. This is to instruct the IdP to add the key_auth and acme_aud claims to the ID token that will be returned as part of the access token.

Once the authentication is completed successfully, the implementation should request an access token from the IdP, extract the ID token from it and return it to the caller.