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
Show TokenResponse Source # | |
Defined in Network.Globus.Auth showsPrec :: Int -> TokenResponse -> ShowS # show :: TokenResponse -> String # showList :: [TokenResponse] -> ShowS # | |
FromJSON TokenResponse Source # | |
Defined in Network.Globus.Auth parseJSON :: Value -> Parser TokenResponse # parseJSONList :: Value -> Parser [TokenResponse] # |
TokenItem | |
|
Instances
Generic TokenItem Source # | |
Show TokenItem Source # | |
FromJSON TokenItem Source # | |
Defined in Network.Globus.Auth | |
type Rep TokenItem Source # | |
Defined in Network.Globus.Auth type Rep TokenItem = D1 ('MetaData "TokenItem" "Network.Globus.Auth" "globus-0.1.2-inplace" '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
Generic UserInfo Source # | |
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.1.2-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 #