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

OAuth2 server responded with an error code errorCode

UnsupportedGrantType

class UnsupportedGrantType : OAuth2Exception

Throw when an OAuth2 server replied with error “unsupported_grant_type”

Properties

errorCode

val errorCode: String?

OAuth2 server replied with

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

OAuth2 server responded with an error code errorCode

UnsupportedGrantType

class UnsupportedGrantType : OAuth2Exception

Throw when an OAuth2 server replied with error “unsupported_grant_type”