GrantType

sealed class GrantType

Represents the OAuth 2.0 grant type. Determines the mechanism Okta uses to authorize the creation of the tokens.

This sealed class allows for a fixed set of standard grant types as well as custom ones.

See also

Inheritors

Types

Link copied to clipboard

The authorization code grant type is used to obtain both access tokens and refresh tokens and is optimized for confidential clients.

Link copied to clipboard
data object DeviceCode : GrantType

The device authorization grant is used by browserless or input-constrained devices in the device flow to obtain an access token.

Link copied to clipboard
data object JwtBearer : GrantType

A grant type that uses a JWT as an authorization grant.

Link copied to clipboard
data object Oob : GrantType

A grant type for Out-of-Band (OOB) authentication, such as push notifications.

Link copied to clipboard
data class Other(val type: String) : GrantType

A custom grant type not defined in the standard set.

Link copied to clipboard
data object Otp : GrantType

A grant type for One-Time Passcode (OTP) authentication, often used as a second factor.

Link copied to clipboard
data object Password : GrantType

The resource owner password credentials grant type is suitable in cases where the resource owner has a trust relationship with the client.

Link copied to clipboard
data object RefreshToken : GrantType

The refresh token grant type is used by clients to exchange a refresh token for a new access token when the current access token becomes invalid or expires.

Link copied to clipboard
data object TokenExchange : GrantType

A grant type for exchanging a token of one type for a token of another type.

Link copied to clipboard
data object WebAuthn : GrantType

A grant type for WebAuthn authentication.

Properties

Link copied to clipboard