Safe Haskell | None |
---|---|
Language | GHC2021 |
Synopsis
- data AuthEvalError
- = AuthError Text
- | AuthenticationFailed AuthEvalError
- | DatabaseFailure AuthEvalError
- | AuthFileNotFound AuthEvalError
- | AuthToAuthorizedUser AuthEvalError
- | AuthWWWBrowserError AuthEvalError
- | GoogleAuthCodeError AuthEvalError
- | NoClientInfo AuthEvalError
- | UnsupportedBackend AuthEvalError
- | NoNapkinGeneratedAuthFile AuthEvalError
- | NotSupported AuthEvalError
- | OSCommandError AuthEvalError
- | ParseCredentialsError AuthEvalError
- | UserProvidedAuthFileNotFound AuthEvalError
- | SpecRelatedError AuthEvalError
- data OAuth2 = OAuth2 {
- clientId :: Text
- clientSecret :: Text
- type CallbackPort = Int
- newtype OAuth2CacheIndex = OAuth2CacheIndex {}
- newtype SpecFile = SpecFile {}
- newtype DbUri = DbUri {}
- newtype CredentialsJson = CredentialsJson {}
- data OAuth2CorrelatedKey = OAuth2CorrelatedKey {}
- data OAuth2Context = OAuth2Context {}
- data NapkinOAuth2 = NapkinOAuth2 {
- oAuth2 :: OAuth2
- context :: OAuth2Context
- data NapkinOAuth2Request
- newtype FromUser = FromUser FilePath
- data OAuth2NapkinAuthApi (a :: k)
- class ManySymbolVal (xs :: [Symbol]) where
- manySymbolVal :: proxy xs -> [String]
- type CodeChallenge = Text
- type CodeVerifier = Text
- type OAuth2Code = Text
- type EncodingMethod = Text
- type GrantType = Text
- type URIQueryParams = [(ByteString, ByteString)]
- type BigQueryScopes = '["https://www.googleapis.com/auth/bigquery", "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/devstorage.read_write"]
- type OAuth2Scopes = '["openid", "https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/accounts.reauth"]
- type CredentialDir = FilePath
- data OAuth2Conf = OAuth2Conf {}
- data OAuth2RunTime = OAuth2RunTime {}
- data OAuth2Token = OAuth2Token {}
- type O2CodeStore = MVar (Either AuthEvalError OAuth2Code)
- data OAuth2Env = OAuth2Env {}
- getOAuthDbPath :: OAuth2Env -> FilePath
- getCorrelatedKey :: OAuth2Env -> OAuth2CorrelatedKey
- getOAuthPort :: OAuth2Env -> Int
- data GCredentials = GCredentials {
- clientId :: Text
- clientSecret :: Text
- refreshToken :: Text
- _type :: Text
Documentation
data AuthEvalError #
Auth related Errors
Instances
OAuth2 | |
|
Instances
Generic OAuth2 # | |||||
Defined in Napkin.Auth.Types
| |||||
Show OAuth2 # | |||||
Eq OAuth2 # | |||||
type Rep OAuth2 # | |||||
Defined in Napkin.Auth.Types type Rep OAuth2 = D1 ('MetaData "OAuth2" "Napkin.Auth.Types" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "OAuth2" 'PrefixI 'True) (S1 ('MetaSel ('Just "clientId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "clientSecret") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) |
type CallbackPort = Int #
newtype OAuth2CacheIndex #
Instances
Generic OAuth2CacheIndex # | |||||
Defined in Napkin.Auth.Types
from :: OAuth2CacheIndex -> Rep OAuth2CacheIndex x # to :: Rep OAuth2CacheIndex x -> OAuth2CacheIndex # | |||||
Show OAuth2CacheIndex # | |||||
Defined in Napkin.Auth.Types showsPrec :: Int -> OAuth2CacheIndex -> ShowS # show :: OAuth2CacheIndex -> String # showList :: [OAuth2CacheIndex] -> ShowS # | |||||
Eq OAuth2CacheIndex # | |||||
Defined in Napkin.Auth.Types (==) :: OAuth2CacheIndex -> OAuth2CacheIndex -> Bool # (/=) :: OAuth2CacheIndex -> OAuth2CacheIndex -> Bool # | |||||
type Rep OAuth2CacheIndex # | |||||
Defined in Napkin.Auth.Types type Rep OAuth2CacheIndex = D1 ('MetaData "OAuth2CacheIndex" "Napkin.Auth.Types" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'True) (C1 ('MetaCons "OAuth2CacheIndex" 'PrefixI 'True) (S1 ('MetaSel ('Just "unIndex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) |
newtype CredentialsJson #
data OAuth2CorrelatedKey #
Instances
data OAuth2Context #
OAuth2Context | |
|
Instances
Generic OAuth2Context # | |||||
Defined in Napkin.Auth.Types
from :: OAuth2Context -> Rep OAuth2Context x # to :: Rep OAuth2Context x -> OAuth2Context # | |||||
Show OAuth2Context # | |||||
Defined in Napkin.Auth.Types showsPrec :: Int -> OAuth2Context -> ShowS # show :: OAuth2Context -> String # showList :: [OAuth2Context] -> ShowS # | |||||
Eq OAuth2Context # | |||||
Defined in Napkin.Auth.Types (==) :: OAuth2Context -> OAuth2Context -> Bool # (/=) :: OAuth2Context -> OAuth2Context -> Bool # | |||||
type Rep OAuth2Context # | |||||
Defined in Napkin.Auth.Types type Rep OAuth2Context = D1 ('MetaData "OAuth2Context" "Napkin.Auth.Types" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "OAuth2Context" 'PrefixI 'True) ((S1 ('MetaSel ('Just "dbPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "callbackPort") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CallbackPort)) :*: (S1 ('MetaSel ('Just "specFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SpecFile) :*: S1 ('MetaSel ('Just "correlatedKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 OAuth2CorrelatedKey)))) |
data NapkinOAuth2 #
Instances
Generic NapkinOAuth2 # | |||||
Defined in Napkin.Auth.Types
from :: NapkinOAuth2 -> Rep NapkinOAuth2 x # to :: Rep NapkinOAuth2 x -> NapkinOAuth2 # | |||||
Show NapkinOAuth2 # | |||||
Defined in Napkin.Auth.Types showsPrec :: Int -> NapkinOAuth2 -> ShowS # show :: NapkinOAuth2 -> String # showList :: [NapkinOAuth2] -> ShowS # | |||||
Eq NapkinOAuth2 # | |||||
Defined in Napkin.Auth.Types (==) :: NapkinOAuth2 -> NapkinOAuth2 -> Bool # (/=) :: NapkinOAuth2 -> NapkinOAuth2 -> Bool # | |||||
type Rep NapkinOAuth2 # | |||||
Defined in Napkin.Auth.Types type Rep NapkinOAuth2 = D1 ('MetaData "NapkinOAuth2" "Napkin.Auth.Types" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "NapkinOAuth2" 'PrefixI 'True) (S1 ('MetaSel ('Just "oAuth2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 OAuth2) :*: S1 ('MetaSel ('Just "context") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 OAuth2Context))) |
data NapkinOAuth2Request #
transforms Auth CLI to Auth Request
ResetOAuth2Credentials OAuth2Context | |
DisplayOAuth2Credentials OAuth2Context | |
CreateOAuth2Credentials OAuth2Context | |
RetrieveOAuth2Credentials OAuth2Context |
Instances
Show NapkinOAuth2Request # | |
Defined in Napkin.Auth.Types showsPrec :: Int -> NapkinOAuth2Request -> ShowS # show :: NapkinOAuth2Request -> String # showList :: [NapkinOAuth2Request] -> ShowS # | |
Eq NapkinOAuth2Request # | |
Defined in Napkin.Auth.Types (==) :: NapkinOAuth2Request -> NapkinOAuth2Request -> Bool # (/=) :: NapkinOAuth2Request -> NapkinOAuth2Request -> Bool # |
data OAuth2NapkinAuthApi (a :: k) #
class ManySymbolVal (xs :: [Symbol]) where #
manySymbolVal :: proxy xs -> [String] #
Instances
ManySymbolVal ('[] :: [Symbol]) # | |
Defined in Napkin.Auth.Types manySymbolVal :: proxy ('[] :: [Symbol]) -> [String] # | |
(KnownSymbol a, ManySymbolVal as) => ManySymbolVal (a ': as) # | |
Defined in Napkin.Auth.Types manySymbolVal :: proxy (a ': as) -> [String] # |
type CodeChallenge = Text #
type CodeVerifier = Text #
type OAuth2Code = Text #
type EncodingMethod = Text #
type URIQueryParams = [(ByteString, ByteString)] #
OAuth2 and bigquery related scopes. for additional detail see: https://developers.google.com/identity/protocols/oauth2/scopes
type BigQueryScopes = '["https://www.googleapis.com/auth/bigquery", "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/devstorage.read_write"] #
type OAuth2Scopes = '["openid", "https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/accounts.reauth"] #
type CredentialDir = FilePath #
Directory path to napkin credential path
data OAuth2Conf #
Instances
Generic OAuth2Conf # | |||||
Defined in Napkin.Auth.Types
from :: OAuth2Conf -> Rep OAuth2Conf x # to :: Rep OAuth2Conf x -> OAuth2Conf # | |||||
Show OAuth2Conf # | |||||
Defined in Napkin.Auth.Types showsPrec :: Int -> OAuth2Conf -> ShowS # show :: OAuth2Conf -> String # showList :: [OAuth2Conf] -> ShowS # | |||||
Eq OAuth2Conf # | |||||
Defined in Napkin.Auth.Types (==) :: OAuth2Conf -> OAuth2Conf -> Bool # (/=) :: OAuth2Conf -> OAuth2Conf -> Bool # | |||||
type Rep OAuth2Conf # | |||||
Defined in Napkin.Auth.Types type Rep OAuth2Conf = D1 ('MetaData "OAuth2Conf" "Napkin.Auth.Types" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "OAuth2Conf" 'PrefixI 'True) ((S1 ('MetaSel ('Just "napkinOAuth2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NapkinOAuth2) :*: (S1 ('MetaSel ('Just "scope") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Proxy OAuth2Scopes)) :*: S1 ('MetaSel ('Just "requestUri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :*: (S1 ('MetaSel ('Just "accessTokenRequest") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "encodingAlgorithm") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EncodingMethod) :*: S1 ('MetaSel ('Just "grantType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GrantType))))) |
data OAuth2RunTime #
Instances
Generic OAuth2RunTime # | |||||
Defined in Napkin.Auth.Types
from :: OAuth2RunTime -> Rep OAuth2RunTime x # to :: Rep OAuth2RunTime x -> OAuth2RunTime # | |||||
Eq OAuth2RunTime # | |||||
Defined in Napkin.Auth.Types (==) :: OAuth2RunTime -> OAuth2RunTime -> Bool # (/=) :: OAuth2RunTime -> OAuth2RunTime -> Bool # | |||||
type Rep OAuth2RunTime # | |||||
Defined in Napkin.Auth.Types type Rep OAuth2RunTime = D1 ('MetaData "OAuth2RunTime" "Napkin.Auth.Types" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "OAuth2RunTime" 'PrefixI 'True) (S1 ('MetaSel ('Just "codeVerifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString) :*: (S1 ('MetaSel ('Just "codeChallenge") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString) :*: S1 ('MetaSel ('Just "callbackUrl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))) |
data OAuth2Token #
Instances
FromJSON OAuth2Token # | |||||
Defined in Napkin.Auth.Types parseJSON :: Value -> Parser OAuth2Token # parseJSONList :: Value -> Parser [OAuth2Token] # | |||||
ToJSON OAuth2Token # | |||||
Defined in Napkin.Auth.Types toJSON :: OAuth2Token -> Value # toEncoding :: OAuth2Token -> Encoding # toJSONList :: [OAuth2Token] -> Value # toEncodingList :: [OAuth2Token] -> Encoding # omitField :: OAuth2Token -> Bool # | |||||
Generic OAuth2Token # | |||||
Defined in Napkin.Auth.Types
from :: OAuth2Token -> Rep OAuth2Token x # to :: Rep OAuth2Token x -> OAuth2Token # | |||||
Show OAuth2Token # | |||||
Defined in Napkin.Auth.Types showsPrec :: Int -> OAuth2Token -> ShowS # show :: OAuth2Token -> String # showList :: [OAuth2Token] -> ShowS # | |||||
Eq OAuth2Token # | |||||
Defined in Napkin.Auth.Types (==) :: OAuth2Token -> OAuth2Token -> Bool # (/=) :: OAuth2Token -> OAuth2Token -> Bool # | |||||
type Rep OAuth2Token # | |||||
Defined in Napkin.Auth.Types type Rep OAuth2Token = D1 ('MetaData "OAuth2Token" "Napkin.Auth.Types" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "OAuth2Token" 'PrefixI 'True) ((S1 ('MetaSel ('Just "accessToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "expiresIn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "refreshToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :*: (S1 ('MetaSel ('Just "scope") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "tokenType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "idToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))))) |
type O2CodeStore = MVar (Either AuthEvalError OAuth2Code) #
Instances
Generic OAuth2Env # | |||||
Defined in Napkin.Auth.Types
| |||||
type Rep OAuth2Env # | |||||
Defined in Napkin.Auth.Types type Rep OAuth2Env = D1 ('MetaData "OAuth2Env" "Napkin.Auth.Types" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "OAuth2Env" 'PrefixI 'True) (S1 ('MetaSel ('Just "conf") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 OAuth2Conf) :*: (S1 ('MetaSel ('Just "runTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 OAuth2RunTime) :*: S1 ('MetaSel ('Just "codeStore") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 O2CodeStore)))) |
getOAuthDbPath :: OAuth2Env -> FilePath #
getOAuthPort :: OAuth2Env -> Int #
data GCredentials #
GCredentials | |
|
Instances
FromJSON GCredentials # | |||||
Defined in Napkin.Auth.Types parseJSON :: Value -> Parser GCredentials # parseJSONList :: Value -> Parser [GCredentials] # | |||||
ToJSON GCredentials # | |||||
Defined in Napkin.Auth.Types toJSON :: GCredentials -> Value # toEncoding :: GCredentials -> Encoding # toJSONList :: [GCredentials] -> Value # toEncodingList :: [GCredentials] -> Encoding # omitField :: GCredentials -> Bool # | |||||
Generic GCredentials # | |||||
Defined in Napkin.Auth.Types
from :: GCredentials -> Rep GCredentials x # to :: Rep GCredentials x -> GCredentials # | |||||
type Rep GCredentials # | |||||
Defined in Napkin.Auth.Types type Rep GCredentials = D1 ('MetaData "GCredentials" "Napkin.Auth.Types" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "GCredentials" 'PrefixI 'True) ((S1 ('MetaSel ('Just "clientId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "clientSecret") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "refreshToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "_type") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))) |