Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- newtype State = State Text
- authorizationUrl :: Token ClientId -> Uri Redirect -> NonEmpty Scope -> State -> Uri Authorization
- fetchAccessTokens :: MonadIO m => Token ClientId -> Token ClientSecret -> Uri Redirect -> Token Exchange -> m (NonEmpty TokenItem)
- redirectUri :: QueryParam param => Uri Redirect -> param
- newtype TokenResponse = TokenResponse (NonEmpty TokenItem)
- data TokenItem = TokenItem {
- scope :: Scopes
- access_token :: Token Access
- expires_in :: Int
- state :: State
- scopeToken :: Scope -> NonEmpty TokenItem -> Maybe (Token Access)
- fetchUserInfo :: MonadIO m => Token OpenId -> m UserInfoResponse
- identityAuth :: Token OpenId -> Option Https
- data UserInfoResponse = UserInfoResponse {}
- data UserInfo = UserInfo {
- sub :: Text
- last_authentication :: Int
- newtype UserEmail = UserEmail Text
- data UserProfile = UserProfile {}
Documentation
Opaque secret identifying the user. Validate on redirect
authorizationUrl :: Token ClientId -> Uri Redirect -> NonEmpty Scope -> State -> Uri Authorization Source #
The end user must visit this url
fetchAccessTokens :: MonadIO m => Token ClientId -> Token ClientSecret -> Uri Redirect -> Token Exchange -> m (NonEmpty TokenItem) Source #
redirectUri :: QueryParam param => Uri Redirect -> param Source #
newtype TokenResponse Source #
fetchAccessTokens returns a non-empty list matching the scopes
Instances
FromJSON TokenResponse Source # | |
Defined in Network.Globus.Auth parseJSON :: Value -> Parser TokenResponse # parseJSONList :: Value -> Parser [TokenResponse] # | |
Show TokenResponse Source # | |
Defined in Network.Globus.Auth showsPrec :: Int -> TokenResponse -> ShowS # show :: TokenResponse -> String # showList :: [TokenResponse] -> ShowS # |
TokenItem | |
|
Instances
FromJSON TokenItem Source # | |
Defined in Network.Globus.Auth | |
Generic TokenItem Source # | |
Show TokenItem Source # | |
type Rep TokenItem Source # | |
Defined in Network.Globus.Auth type Rep TokenItem = D1 ('MetaData "TokenItem" "Network.Globus.Auth" "globus-0.1.3-717zbk1pF7jBkH3Wb8XUPf" 'False) (C1 ('MetaCons "TokenItem" 'PrefixI 'True) ((S1 ('MetaSel ('Just "scope") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Scopes) :*: S1 ('MetaSel ('Just "access_token") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Token 'Access))) :*: (S1 ('MetaSel ('Just "expires_in") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "state") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 State)))) |
fetchUserInfo :: MonadIO m => Token OpenId -> m UserInfoResponse Source #
You MUST include the OpenId Scope for this to work
data UserInfoResponse Source #
Instances
FromJSON UserInfoResponse Source # | |
Defined in Network.Globus.Auth parseJSON :: Value -> Parser UserInfoResponse # parseJSONList :: Value -> Parser [UserInfoResponse] # |
UserInfo | |
|
Instances
FromJSON UserInfo Source # | |
Defined in Network.Globus.Auth | |
Generic UserInfo Source # | |
Show UserInfo Source # | |
type Rep UserInfo Source # | |
Defined in Network.Globus.Auth type Rep UserInfo = D1 ('MetaData "UserInfo" "Network.Globus.Auth" "globus-0.1.3-717zbk1pF7jBkH3Wb8XUPf" '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 #