OAuth2Client

The client used for interacting with an Okta Authorization Server.

This is for low level access, and it's typically preferred to use a Credential, which streamlines usage.

Okta Developer Docs

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard

Performs the OIDC User Info call, which returns claims associated with the supplied accessToken.

Link copied to clipboard

Performs a call to the Authorization Server to validate the specified TokenType.

Link copied to clipboard
suspend fun jwks(): OAuth2ClientResult<Jwks>

Performs a call to the Authorization Server to fetch Jwks.

Link copied to clipboard
suspend fun OAuth2Client.performRequest(request: Request): OAuth2ClientResult<Response>
suspend fun <Raw, Dto> OAuth2Client.performRequest(deserializationStrategy: DeserializationStrategy<Raw>, request: Request, shouldAttemptJsonDeserialization: (Response) -> Boolean = { it.isSuccessful }, responseMapper: (Raw) -> Dto): OAuth2ClientResult<Dto>
Link copied to clipboard

Attempt to refresh the token.

Link copied to clipboard
suspend fun revokeToken(revokeTokenType: RevokeTokenType, token: Token): OAuth2ClientResult<Unit>

Attempt to revoke the specified token.

Link copied to clipboard
suspend fun tokenRequest(request: Request, nonce: String? = null, maxAge: Int? = null, requestToken: Token? = null): OAuth2ClientResult<Token>