hoauth2-2.14.3: Haskell OAuth2 authentication client

Safe Haskell | None
Language | Haskell2010

Network.OAuth2.Experiment.Grants.DeviceAuthorization

Synopsis

- data DeviceAuthorizationApplication = DeviceAuthorizationApplication {
  - daName :: Text
  - daClientId :: ClientId
  - daClientSecret :: ClientSecret
  - daScope :: Set Scope
  - daAuthorizationRequestExtraParam :: Map Text Text
  - daAuthorizationRequestAuthenticationMethod :: Maybe ClientAuthenticationMethod
  }
- pollDeviceTokenRequest :: forall {k} (m :: Type -> Type) (i :: k). MonadIO m => IdpApplication i DeviceAuthorizationApplication -> Manager -> DeviceAuthorizationResponse -> ExceptT TokenResponseError m OAuth2Token

# Documentation

data DeviceAuthorizationApplication Source #

An Application that supports "Device Authorization Grant"

https://www.rfc-editor.org/rfc/rfc8628#section-3.1

Constructors

DeviceAuthorizationApplication |

Fields

- daName :: Text
- daClientId :: ClientId
- daClientSecret :: ClientSecret
- daScope :: Set Scope
- daAuthorizationRequestExtraParam :: Map Text Text

  Additional parameters to the device authorization request. Most of identity providers follow the spec strictly but AzureAD requires "tenant" parameter.

- daAuthorizationRequestAuthenticationMethod :: Maybe ClientAuthenticationMethod

  The spec requires similar authentication method as /token request. Most of identity providers doesn't required it but some does like Okta.

#### Instances

Instances details

HasDeviceAuthorizationRequest DeviceAuthorizationApplication Source # |
Instance details Defined in Network.OAuth2.Experiment.Grants.DeviceAuthorization Methods mkDeviceAuthorizationRequestParam :: DeviceAuthorizationApplication -> DeviceAuthorizationRequestParam Source #
HasTokenRequest DeviceAuthorizationApplication Source # | https://www.rfc-editor.org/rfc/rfc8628#section-3.4

Instance details

Defined in Network.OAuth2.Experiment.Grants.DeviceAuthorization

Associated Types

data TokenRequest DeviceAuthorizationApplication |

Instance details

Defined in Network.OAuth2.Experiment.Grants.DeviceAuthorization

data TokenRequest DeviceAuthorizationApplication = AuthorizationCodeTokenRequest {

- trCode :: DeviceCode
- trGrantType :: GrantTypeValue
- trClientId :: Maybe ClientId

}

type ExchangeTokenInfo DeviceAuthorizationApplication |
Instance details Defined in Network.OAuth2.Experiment.Grants.DeviceAuthorization type ExchangeTokenInfo DeviceAuthorizationApplication = DeviceCode

Methods

mkTokenRequestParam :: DeviceAuthorizationApplication -> ExchangeTokenInfo DeviceAuthorizationApplication -> TokenRequest DeviceAuthorizationApplication Source #

HasTokenRequestClientAuthenticationMethod DeviceAuthorizationApplication Source # |
Instance details Defined in Network.OAuth2.Experiment.Grants.DeviceAuthorization Methods getClientAuthenticationMethod :: DeviceAuthorizationApplication -> ClientAuthenticationMethod Source #
HasOAuth2Key DeviceAuthorizationApplication Source # |
Instance details Defined in Network.OAuth2.Experiment.Grants.DeviceAuthorization Methods mkOAuth2Key :: DeviceAuthorizationApplication -> OAuth2 Source #
HasUserInfoRequest DeviceAuthorizationApplication Source # |
Instance details Defined in Network.OAuth2.Experiment.Grants.DeviceAuthorization
ToQueryParam (TokenRequest DeviceAuthorizationApplication) Source # |
Instance details Defined in Network.OAuth2.Experiment.Grants.DeviceAuthorization Methods toQueryParam :: TokenRequest DeviceAuthorizationApplication -> Map Text Text Source #
type ExchangeTokenInfo DeviceAuthorizationApplication Source # |
Instance details Defined in Network.OAuth2.Experiment.Grants.DeviceAuthorization type ExchangeTokenInfo DeviceAuthorizationApplication = DeviceCode
data TokenRequest DeviceAuthorizationApplication Source # |

Instance details

Defined in Network.OAuth2.Experiment.Grants.DeviceAuthorization

data TokenRequest DeviceAuthorizationApplication = AuthorizationCodeTokenRequest {

- trCode :: DeviceCode
- trGrantType :: GrantTypeValue
- trClientId :: Maybe ClientId

}

pollDeviceTokenRequest :: forall {k} (m :: Type -> Type) (i :: k). MonadIO m => IdpApplication i DeviceAuthorizationApplication -> Manager -> DeviceAuthorizationResponse -> ExceptT TokenResponseError m OAuth2Token Source #