OAuth2Exception

sealed class OAuth2Exception : Exception

Represents a error during communicating to OAuth2 server

Exceptions

InvalidGrant

class InvalidGrant : OAuth2Exception

OAuth2 server responded error=”invalid_grant”

MissingAccessToken

class MissingAccessToken : OAuth2Exception

Thrown when an OAuth2 server replied with successful HTTP status and expected content type that was successfully decoded but the response doesn’t contain error code nor access token

UnknownException

class UnknownException : 
    OAuth2Exception,
    CopyableThrowable<UnknownException>

OAuth2 server responded with an error code errorCode

UnsupportedGrantType

class UnsupportedGrantType : 
    OAuth2Exception,
    CopyableThrowable<UnsupportedGrantType>

Throw when an OAuth2 server replied with error “unsupported_grant_type”

Properties

errorCode

val errorCode: String?

OAuth2 server replied with

Extension Properties

rootCause

val Throwable.rootCause: Throwable?

Root cause of the Throwable.

Inheritors

InvalidGrant

class InvalidGrant : OAuth2Exception

OAuth2 server responded error=”invalid_grant”

MissingAccessToken

class MissingAccessToken : OAuth2Exception

Thrown when an OAuth2 server replied with successful HTTP status and expected content type that was successfully decoded but the response doesn’t contain error code nor access token

UnknownException

class UnknownException : 
    OAuth2Exception,
    CopyableThrowable<UnknownException>

OAuth2 server responded with an error code errorCode

UnsupportedGrantType

class UnsupportedGrantType : 
    OAuth2Exception,
    CopyableThrowable<UnsupportedGrantType>

Throw when an OAuth2 server replied with error “unsupported_grant_type”