The auth config this handler reads. It stays readable and replaceable after construction; each method reads the current value.
The auth config this handler reads. It stays readable and replaceable after construction; each method reads the current value.
Builds the auth request to send to the client.
The result is always a new object, and its exchangedAuthCredential is
never an object held by authConfig. A caller that fills in the
response, for example exchangedAuthCredential.oauth2.authResponseUri,
therefore leaves the handler's credentials unchanged.
When the config is returned as is, because the scheme is not OAuth2 or
OpenID Connect or the exchanged credential already has an auth URI, the
result is a deep copy of the whole config. In the other branches only the
exchanged credential is guaranteed independent: authScheme and
rawAuthCredential are the handler's own objects.
The auth config to request from the client.
Generates an response containing the auth uri for user to sign in.
When the credential requests PKCE, the URI also carries the S256 code challenge derived from the credential's code verifier, and the returned credential carries the verifier the later token exchange must send.
The URI leaves out redirect_uri when the credential has no
redirectUri, so the provider uses the redirect registered for the
client, and leaves out scope when the scheme lists no scopes.
An AuthCredential object containing the auth URI and state.
Stores the exchanged credential in the session state.
The session state to store the credential in.
A handler that handles the auth flow in Agent Development Kit to help orchestrates the credential request and response flow (e.g. OAuth flow) This class should only be used by Agent Development Kit.