OidcClient

open class OidcClient(config: OidcClientConfig)

Class representing an OpenID Connect client.

Constructors

Link copied to clipboard
constructor(config: OidcClientConfig)

Functions

Link copied to clipboard
suspend fun endSession(): Boolean

Ends the session. Best effort to end the session. The stored token is removed regardless of the result.

suspend fun endSession(signOff: suspend (IdToken) -> Boolean): Boolean

Ends the session with a custom sign-off procedure.

Link copied to clipboard
suspend fun revoke()

Revokes the access token.

Link copied to clipboard
suspend fun token(): Result<Token, OidcError>

Retrieves an access token. If a cached token is available and not expired, it is returned. Otherwise, a new token is fetched with refresh token if refresh grant is available.

Link copied to clipboard
suspend fun userinfo(): Result<JsonObject, OidcError>

Retrieves user information.