| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Network.OAuth2.Experiment.Types
Synopsis
- data Idp (i :: k) = Idp {}
- data IdpApplication (i :: k) a = IdpApplication {
- idp :: Idp i
- application :: a
- newtype Scope = Scope {}
- data GrantTypeValue
- data ResponseType = Code
- newtype ClientId = ClientId {
- unClientId :: Text
- newtype ClientSecret = ClientSecret {}
- toOAuth2Key :: ClientId -> ClientSecret -> OAuth2
- newtype RedirectUri = RedirectUri {
- unRedirectUri :: URI
- newtype AuthorizeState = AuthorizeState {}
- newtype Username = Username {
- unUsername :: Text
- newtype Password = Password {
- unPassword :: Text
- class ToQueryParam a where
- toQueryParam :: a -> Map Text Text
- class HasOAuth2Key a where
- mkOAuth2Key :: a -> OAuth2
Idp App
Idp i consists various endpoints endpoints.
The i is actually phantom type for information only (Idp name) at this moment.
And it is PolyKinds.
Hence whenever Idp i or IdpApplication i a is used as function parameter,
PolyKinds need to be enabled.
Constructors
| Idp | |
Fields
| |
data IdpApplication (i :: k) a Source #
An OAuth2 Application "a" of IdP "i". "a" can be one of following type:
Constructors
| IdpApplication | |
Fields
| |
Scope
Grant Type value
data GrantTypeValue Source #
Grant type query parameter has association with different GrantType flows but not completely strict.
e.g. Both AuthorizationCode and ResourceOwnerPassword flow could support refresh token flow.
Constructors
| GTAuthorizationCode | |
| GTPassword | |
| GTClientCredentials | |
| GTRefreshToken | |
| GTJwtBearer | |
| GTDeviceCode |
Instances
| Show GrantTypeValue Source # | |
Defined in Network.OAuth2.Experiment.Types Methods showsPrec :: Int -> GrantTypeValue -> ShowS # show :: GrantTypeValue -> String # showList :: [GrantTypeValue] -> ShowS # | |
| Eq GrantTypeValue Source # | |
Defined in Network.OAuth2.Experiment.Types Methods (==) :: GrantTypeValue -> GrantTypeValue -> Bool # (/=) :: GrantTypeValue -> GrantTypeValue -> Bool # | |
| ToQueryParam GrantTypeValue Source # | |
Defined in Network.OAuth2.Experiment.Types Methods toQueryParam :: GrantTypeValue -> Map Text Text Source # | |
data ResponseType Source #
Constructors
| Code |
Instances
| ToQueryParam ResponseType Source # | |
Defined in Network.OAuth2.Experiment.Types Methods toQueryParam :: ResponseType -> Map Text Text Source # | |
Credentials
Constructors
| ClientId | |
Fields
| |
newtype ClientSecret Source #
Can be either "Client Secret" or JWT base on client authentication method
Constructors
| ClientSecret | |
Fields | |
Instances
| IsString ClientSecret Source # | |
Defined in Network.OAuth2.Experiment.Types Methods fromString :: String -> ClientSecret # | |
| Eq ClientSecret Source # | |
Defined in Network.OAuth2.Experiment.Types | |
| ToQueryParam ClientSecret Source # | |
Defined in Network.OAuth2.Experiment.Types Methods toQueryParam :: ClientSecret -> Map Text Text Source # | |
toOAuth2Key :: ClientId -> ClientSecret -> OAuth2 Source #
In order to reuse some methods from legacy Network.OAuth.OAuth2. Will be removed when Experiment module becomes default.
newtype RedirectUri Source #
Constructors
| RedirectUri | |
Fields
| |
Instances
| Eq RedirectUri Source # | |
Defined in Network.OAuth2.Experiment.Types | |
| ToQueryParam RedirectUri Source # | |
Defined in Network.OAuth2.Experiment.Types Methods toQueryParam :: RedirectUri -> Map Text Text Source # | |
newtype AuthorizeState Source #
Constructors
| AuthorizeState | |
Fields | |
Instances
| IsString AuthorizeState Source # | |
Defined in Network.OAuth2.Experiment.Types Methods fromString :: String -> AuthorizeState # | |
| Eq AuthorizeState Source # | |
Defined in Network.OAuth2.Experiment.Types Methods (==) :: AuthorizeState -> AuthorizeState -> Bool # (/=) :: AuthorizeState -> AuthorizeState -> Bool # | |
| ToQueryParam AuthorizeState Source # | |
Defined in Network.OAuth2.Experiment.Types Methods toQueryParam :: AuthorizeState -> Map Text Text Source # | |
Constructors
| Username | |
Fields
| |
Instances
| IsString Username Source # | |
Defined in Network.OAuth2.Experiment.Types Methods fromString :: String -> Username # | |
| Eq Username Source # | |
| ToQueryParam Username Source # | |
Defined in Network.OAuth2.Experiment.Types | |
Constructors
| Password | |
Fields
| |
Instances
| IsString Password Source # | |
Defined in Network.OAuth2.Experiment.Types Methods fromString :: String -> Password # | |
| Eq Password Source # | |
| ToQueryParam Password Source # | |
Defined in Network.OAuth2.Experiment.Types | |
Query parameters
class ToQueryParam a where Source #
Instances
class HasOAuth2Key a where Source #
Methods
mkOAuth2Key :: a -> OAuth2 Source #