hoauth2-2.14.3: Haskell OAuth2 authentication client

Safe Haskell | None
Language | Haskell2010

Network.OAuth2.Experiment.Flows.DeviceAuthorizationRequest

Synopsis

- newtype DeviceCode = DeviceCode Text
- data DeviceAuthorizationResponse = DeviceAuthorizationResponse {
  - deviceCode :: DeviceCode
  - userCode :: Text
  - verificationUri :: URI
  - verificationUriComplete :: Maybe URI
  - expiresIn :: Integer
  - interval :: Maybe Int
  }
- data DeviceAuthorizationRequestParam = DeviceAuthorizationRequestParam {
  - arScope :: Set Scope
  - arClientId :: Maybe ClientId
  - arExtraParams :: Map Text Text
  }
- class HasOAuth2Key a => HasDeviceAuthorizationRequest a where
  - mkDeviceAuthorizationRequestParam :: a -> DeviceAuthorizationRequestParam
- conduitDeviceAuthorizationRequest :: forall {k} (m :: Type -> Type) a (i :: k). (MonadIO m, HasDeviceAuthorizationRequest a) => IdpApplication i a -> Manager -> ExceptT ByteString m DeviceAuthorizationResponse

# Documentation

newtype DeviceCode Source #

Constructors

DeviceCode Text |

#### Instances

Instances details

FromJSON DeviceCode Source # |
Instance details Defined in Network.OAuth2.Experiment.Flows.DeviceAuthorizationRequest Methods parseJSON :: Value -> Parser DeviceCode Source # parseJSONList :: Value -> Parser [DeviceCode] Source # omittedField :: Maybe DeviceCode Source #
ToQueryParam DeviceCode Source # |
Instance details Defined in Network.OAuth2.Experiment.Flows.DeviceAuthorizationRequest Methods toQueryParam :: DeviceCode -> Map Text Text Source #

data DeviceAuthorizationResponse Source #

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

Constructors

DeviceAuthorizationResponse |

Fields

- deviceCode :: DeviceCode
- userCode :: Text
- verificationUri :: URI
- verificationUriComplete :: Maybe URI
- expiresIn :: Integer
- interval :: Maybe Int

#### Instances

Instances details

FromJSON DeviceAuthorizationResponse Source # |
Instance details Defined in Network.OAuth2.Experiment.Flows.DeviceAuthorizationRequest Methods parseJSON :: Value -> Parser DeviceAuthorizationResponse Source # parseJSONList :: Value -> Parser [DeviceAuthorizationResponse] Source # omittedField :: Maybe DeviceAuthorizationResponse Source #

data DeviceAuthorizationRequestParam Source #

Constructors

DeviceAuthorizationRequestParam |

Fields

- arScope :: Set Scope
- arClientId :: Maybe ClientId
- arExtraParams :: Map Text Text

#### Instances

Instances details

ToQueryParam DeviceAuthorizationRequestParam Source # |
Instance details Defined in Network.OAuth2.Experiment.Flows.DeviceAuthorizationRequest Methods toQueryParam :: DeviceAuthorizationRequestParam -> Map Text Text Source #

class HasOAuth2Key a => HasDeviceAuthorizationRequest a where Source #

Methods

mkDeviceAuthorizationRequestParam :: a -> DeviceAuthorizationRequestParam Source #

Create Device Authorization Request parameters https://www.rfc-editor.org/rfc/rfc8628#section-3.1

#### Instances

Instances details

HasDeviceAuthorizationRequest DeviceAuthorizationApplication Source # |
Instance details Defined in Network.OAuth2.Experiment.Grants.DeviceAuthorization Methods mkDeviceAuthorizationRequestParam :: DeviceAuthorizationApplication -> DeviceAuthorizationRequestParam Source #

conduitDeviceAuthorizationRequest :: forall {k} (m :: Type -> Type) a (i :: k). (MonadIO m, HasDeviceAuthorizationRequest a) => IdpApplication i a -> Manager -> ExceptT ByteString m DeviceAuthorizationResponse Source #

Makes Device Authorization Request https://www.rfc-editor.org/rfc/rfc8628#section-3.1