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
FromJSON TokenResponse Source # | |
Defined in Network.Globus.Auth Methods parseJSON :: Value -> Parser TokenResponse # parseJSONList :: Value -> Parser [TokenResponse] # | |
Show TokenResponse Source # | |
Defined in Network.Globus.Auth Methods showsPrec :: Int -> TokenResponse -> ShowS # show :: TokenResponse -> String # showList :: [TokenResponse] -> ShowS # |
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
data UserProfile Source #
Constructors
UserProfile | |
Fields |
Instances
FromJSON UserProfile Source # | |||||
Defined in Network.Globus.Auth | |||||
Generic UserProfile Source # | |||||
Defined in Network.Globus.Auth Associated Types
| |||||
Show UserProfile Source # | |||||
Defined in Network.Globus.Auth Methods showsPrec :: Int -> UserProfile -> ShowS # show :: UserProfile -> String # showList :: [UserProfile] -> ShowS # | |||||
type Rep UserProfile Source # | |||||
Defined in Network.Globus.Auth type Rep UserProfile = D1 ('MetaData "UserProfile" "Network.Globus.Auth" "globus-0.2.1-85rzRRnpoUqQWRs7VBwFT" 'False) (C1 ('MetaCons "UserProfile" 'PrefixI 'True) ((S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "organization") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "preferred_username") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "identity_provider") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "identity_provider_display_name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))) |