Safe Haskell | None |
---|---|
Language | GHC2021 |
Network.Globus.Auth
Synopsis
- authorizationUrl :: Token 'ClientId -> Uri 'Redirect -> NonEmpty Scope -> State -> Uri 'Authorization
- fetchAccessTokens :: (MonadIO m, MonadThrow m, MonadCatch m) => Manager -> Token 'ClientId -> Token 'ClientSecret -> Uri 'Redirect -> Token 'Exchange -> m (NonEmpty TokenItem)
- redirectUri :: forall {k} (a :: k). Uri 'Redirect -> Uri a -> Uri a
- newtype TokenResponse = TokenResponse (NonEmpty TokenItem)
- scopeToken :: Scope -> NonEmpty TokenItem -> Maybe (Token 'Access)
- fetchUserInfo :: (MonadIO m, MonadCatch m, MonadThrow m) => Manager -> Token 'OpenId -> m UserInfoResponse
- authEndpoint :: Uri 'Authorization
- identityAuth :: Token 'OpenId -> Header
- data UserInfoResponse = UserInfoResponse {}
- data UserInfo = UserInfo {
- sub :: Text
- last_authentication :: Int
- newtype UserEmail = UserEmail Text
- data UserProfile = UserProfile {}
Documentation
authorizationUrl :: Token 'ClientId -> Uri 'Redirect -> NonEmpty Scope -> State -> Uri 'Authorization Source #
The end user must visit this url
fetchAccessTokens :: (MonadIO m, MonadThrow m, MonadCatch m) => Manager -> Token 'ClientId -> Token 'ClientSecret -> Uri 'Redirect -> Token 'Exchange -> m (NonEmpty TokenItem) Source #
newtype TokenResponse Source #
fetchAccessTokens returns a non-empty list matching the scopes
Constructors
TokenResponse (NonEmpty TokenItem) |
Instances
Show TokenResponse Source # | |
Defined in Network.Globus.Auth Methods showsPrec :: Int -> TokenResponse -> ShowS # show :: TokenResponse -> String # showList :: [TokenResponse] -> ShowS # | |
FromJSON TokenResponse Source # | |
Defined in Network.Globus.Auth Methods parseJSON :: Value -> Parser TokenResponse # parseJSONList :: Value -> Parser [TokenResponse] # |
fetchUserInfo :: (MonadIO m, MonadCatch m, MonadThrow m) => Manager -> Token 'OpenId -> m UserInfoResponse Source #
You MUST include the OpenId Scope for this to work
data UserInfoResponse Source #
Constructors
UserInfoResponse | |
Instances
FromJSON UserInfoResponse Source # | |
Defined in Network.Globus.Auth Methods parseJSON :: Value -> Parser UserInfoResponse # parseJSONList :: Value -> Parser [UserInfoResponse] # |
Constructors
UserInfo | |
Fields
|
Instances
Generic UserInfo Source # | |||||
Defined in Network.Globus.Auth Associated Types
| |||||
Show UserInfo Source # | |||||
FromJSON UserInfo Source # | |||||
Defined in Network.Globus.Auth | |||||
type Rep UserInfo Source # | |||||
Defined in Network.Globus.Auth type Rep UserInfo = D1 ('MetaData "UserInfo" "Network.Globus.Auth" "globus-0.2.0-inplace" 'False) (C1 ('MetaCons "UserInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "sub") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "last_authentication") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) |
data UserProfile Source #
Constructors
UserProfile | |
Fields |