Copyright | (c) Soostone Inc 2020 |
---|---|
License | AllRightsReserved |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
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
- authErrorFromString :: String -> AuthEvalError
- toAuthError :: Show a => a -> AuthEvalError
- data OAuth2 = OAuth2 {}
- class HasClientId s a | s -> a where
- class HasClientSecret s a | s -> a where
- clientSecret :: Lens' s a
- type CallbackPort = Int
- newtype OAuth2CacheIndex = OAuth2CacheIndex {}
- newtype SpecFile = SpecFile {}
- newtype DbUri = DbUri {}
- newtype CredentialsJson = CredentialsJson {}
- data OAuth2CorrelatedKey = OAuth2CorrelatedKey {}
- class HasAppName s a | s -> a where
- class HasDbUri s a | s -> a where
- class HasSpecFile s a | s -> a where
- class OAuth2CorrelatedKeyBuilder a where
- correlatedKey :: a -> OAuth2CorrelatedKey
- data OAuth2Context = OAuth2Context {}
- class HasCallbackPort s a | s -> a where
- callbackPort :: Lens' s a
- class HasOAuth2CorrelatedKey s a | s -> a where
- oAuth2CorrelatedKey :: Lens' s a
- class HasOAuth2dbPath s a | s -> a where
- oAuth2dbPath :: Lens' s a
- data NapkinOAuth2 = NapkinOAuth2 {}
- class HasOAuth2 s a | s -> a where
- class HasOAuth2context s a | s -> a where
- oAuth2context :: Lens' s a
- data NapkinOAuth2Request
- newtype FromUser = FromUser FilePath
- data OAuth2NapkinAuthApi a
- 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"]
- authScopeType :: Proxy '["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 {
- _oAuth2ConfNapkinOAuth2 :: NapkinOAuth2
- _oAuth2ConfOAuth2scope :: Proxy '["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"]
- _oAuth2ConfOAuth2requestUri :: URI
- _oAuth2ConfOAuth2accessTokenRequestUri :: Text
- _oAuth2ConfOAuth2encodingAlgorithm :: EncodingMethod
- _oAuth2ConfOAuth2grantType :: GrantType
- class HasNapkinOAuth2 s a | s -> a where
- napkinOAuth2 :: Lens' s a
- class HasOAuth2accessTokenRequestUri s a | s -> a where
- oAuth2accessTokenRequestUri :: Lens' s a
- class HasOAuth2encodingAlgorithm s a | s -> a where
- oAuth2encodingAlgorithm :: Lens' s a
- class HasOAuth2grantType s a | s -> a where
- oAuth2grantType :: Lens' s a
- class HasOAuth2requestUri s a | s -> a where
- oAuth2requestUri :: Lens' s a
- class HasOAuth2scope s a | s -> a where
- oAuth2scope :: Lens' s a
- data OAuth2RunTime = OAuth2RunTime {}
- class HasOAuth2callbackUrl s a | s -> a where
- oAuth2callbackUrl :: Lens' s a
- class HasOAuth2codeChallenge s a | s -> a where
- oAuth2codeChallenge :: Lens' s a
- class HasOAuth2codeVerifier s a | s -> a where
- oAuth2codeVerifier :: Lens' s a
- data OAuth2Token = OAuth2Token {}
- class HasAccessToken s a | s -> a where
- accessToken :: Lens' s a
- class HasExpiresIn s a | s -> a where
- class HasIdToken s a | s -> a where
- class HasRefreshToken s a | s -> a where
- refreshToken :: Lens' s a
- class HasScope s a | s -> a where
- class HasTokenType s a | s -> a where
- data OAuth2CodeWithSource
- type O2CodeStore = MVar (Either AuthEvalError OAuth2CodeWithSource)
- data OAuth2Env = OAuth2Env {}
- class HasO2codeStore s a | s -> a where
- o2codeStore :: Lens' s a
- class HasO2conf s a | s -> a where
- class HasO2runTime s a | s -> a where
- getOAuthDbPath :: OAuth2Env -> FilePath
- getCorrelatedKey :: OAuth2Env -> OAuth2CorrelatedKey
- getOAuthPort :: OAuth2Env -> Int
- data GCredentials = GCredentials {}
- class HasCtype s a | s -> a where
Documentation
data AuthEvalError #
Authre related Errors
Instances
toAuthError :: Show a => a -> AuthEvalError #
Instances
Eq OAuth2 # | |
Show OAuth2 # | |
HasClientSecret OAuth2 Text # | |
Defined in Napkin.Auth.Types clientSecret :: Lens' OAuth2 Text # | |
HasClientId OAuth2 Text # | |
HasOAuth2 NapkinOAuth2 OAuth2 # | |
Defined in Napkin.Auth.Types |
class HasClientId s a | s -> a where #
Instances
HasClientId OAuth2 Text # | |
HasClientId GCredentials Text # | |
Defined in Napkin.Auth.Types |
class HasClientSecret s a | s -> a where #
clientSecret :: Lens' s a #
Instances
HasClientSecret OAuth2 Text # | |
Defined in Napkin.Auth.Types clientSecret :: Lens' OAuth2 Text # | |
HasClientSecret GCredentials Text # | |
Defined in Napkin.Auth.Types |
type CallbackPort = Int #
newtype OAuth2CacheIndex #
Instances
Eq OAuth2CacheIndex # | |
Defined in Napkin.Auth.Types (==) :: OAuth2CacheIndex -> OAuth2CacheIndex -> Bool # (/=) :: OAuth2CacheIndex -> OAuth2CacheIndex -> Bool # | |
Show OAuth2CacheIndex # | |
Defined in Napkin.Auth.Types showsPrec :: Int -> OAuth2CacheIndex -> ShowS # show :: OAuth2CacheIndex -> String # showList :: [OAuth2CacheIndex] -> ShowS # |
Instances
Eq SpecFile # | |
Show SpecFile # | |
HasSpecFile OAuth2CorrelatedKey SpecFile # | |
Defined in Napkin.Auth.Types | |
HasSpecFile OAuth2Context SpecFile # | |
Defined in Napkin.Auth.Types |
newtype CredentialsJson #
class HasAppName s a | s -> a where #
Instances
HasAppName OAuth2CorrelatedKey (Maybe AppName) # | |
Defined in Napkin.Auth.Types |
class HasDbUri s a | s -> a where #
Instances
HasDbUri OAuth2CorrelatedKey DbUri # | |
Defined in Napkin.Auth.Types |
class HasSpecFile s a | s -> a where #
Instances
HasSpecFile OAuth2CorrelatedKey SpecFile # | |
Defined in Napkin.Auth.Types | |
HasSpecFile OAuth2Context SpecFile # | |
Defined in Napkin.Auth.Types |
class OAuth2CorrelatedKeyBuilder a where #
correlatedKey :: a -> OAuth2CorrelatedKey #
data OAuth2Context #
OAuth2Context | |
|
Instances
Eq OAuth2Context # | |
Defined in Napkin.Auth.Types (==) :: OAuth2Context -> OAuth2Context -> Bool # (/=) :: OAuth2Context -> OAuth2Context -> Bool # | |
Show OAuth2Context # | |
Defined in Napkin.Auth.Types showsPrec :: Int -> OAuth2Context -> ShowS # show :: OAuth2Context -> String # showList :: [OAuth2Context] -> ShowS # | |
HasSpecFile OAuth2Context SpecFile # | |
Defined in Napkin.Auth.Types | |
HasOAuth2dbPath OAuth2Context FilePath # | |
Defined in Napkin.Auth.Types | |
HasOAuth2CorrelatedKey OAuth2Context OAuth2CorrelatedKey # | |
HasCallbackPort OAuth2Context CallbackPort # | |
Defined in Napkin.Auth.Types | |
HasOAuth2context NapkinOAuth2 OAuth2Context # | |
Defined in Napkin.Auth.Types |
data NapkinOAuth2 #
Instances
Eq NapkinOAuth2 # | |
Defined in Napkin.Auth.Types (==) :: NapkinOAuth2 -> NapkinOAuth2 -> Bool # (/=) :: NapkinOAuth2 -> NapkinOAuth2 -> Bool # | |
Show NapkinOAuth2 # | |
Defined in Napkin.Auth.Types showsPrec :: Int -> NapkinOAuth2 -> ShowS # show :: NapkinOAuth2 -> String # showList :: [NapkinOAuth2] -> ShowS # | |
HasOAuth2context NapkinOAuth2 OAuth2Context # | |
Defined in Napkin.Auth.Types | |
HasOAuth2 NapkinOAuth2 OAuth2 # | |
Defined in Napkin.Auth.Types | |
HasNapkinOAuth2 OAuth2Conf NapkinOAuth2 # | |
Defined in Napkin.Auth.Types |
class HasOAuth2 s a | s -> a where #
Instances
HasOAuth2 NapkinOAuth2 OAuth2 # | |
Defined in Napkin.Auth.Types |
data NapkinOAuth2Request #
transforms Auth CLI to Auth Request
ResetOAuth2Credentials OAuth2Context | |
DisplayOAuth2Credentials OAuth2Context | |
CreateOAuth2Credentials OAuth2Context | |
RetrieveOAuth2Credentials OAuth2Context |
Instances
Eq NapkinOAuth2Request # | |
Defined in Napkin.Auth.Types (==) :: NapkinOAuth2Request -> NapkinOAuth2Request -> Bool # (/=) :: NapkinOAuth2Request -> NapkinOAuth2Request -> Bool # | |
Show NapkinOAuth2Request # | |
Defined in Napkin.Auth.Types showsPrec :: Int -> NapkinOAuth2Request -> ShowS # show :: NapkinOAuth2Request -> String # showList :: [NapkinOAuth2Request] -> ShowS # |
data OAuth2NapkinAuthApi a #
class ManySymbolVal (xs :: [Symbol]) where #
manySymbolVal :: proxy xs -> [String] #
Instances
ManySymbolVal ('[] :: [Symbol]) # | |
Defined in Napkin.Auth.Types manySymbolVal :: proxy '[] -> [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"] #
authScopeType :: Proxy '["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 #
directroy path to napkin credential path
data OAuth2Conf #
OAuth2Conf | |
|
Instances
Eq OAuth2Conf # | |
Defined in Napkin.Auth.Types (==) :: OAuth2Conf -> OAuth2Conf -> Bool # (/=) :: OAuth2Conf -> OAuth2Conf -> Bool # | |
Show OAuth2Conf # | |
Defined in Napkin.Auth.Types showsPrec :: Int -> OAuth2Conf -> ShowS # show :: OAuth2Conf -> String # showList :: [OAuth2Conf] -> ShowS # | |
HasOAuth2requestUri OAuth2Conf URI # | |
Defined in Napkin.Auth.Types | |
HasOAuth2grantType OAuth2Conf GrantType # | |
Defined in Napkin.Auth.Types | |
HasOAuth2encodingAlgorithm OAuth2Conf EncodingMethod # | |
Defined in Napkin.Auth.Types | |
HasOAuth2accessTokenRequestUri OAuth2Conf Text # | |
Defined in Napkin.Auth.Types | |
HasNapkinOAuth2 OAuth2Conf NapkinOAuth2 # | |
Defined in Napkin.Auth.Types | |
HasO2conf OAuth2Env OAuth2Conf # | |
Defined in Napkin.Auth.Types | |
HasOAuth2scope OAuth2Conf (Proxy '["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"]) # | |
Defined in Napkin.Auth.Types oAuth2scope :: Lens' OAuth2Conf (Proxy '["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"]) # |
class HasOAuth2accessTokenRequestUri s a | s -> a where #
oAuth2accessTokenRequestUri :: Lens' s a #
Instances
class HasOAuth2encodingAlgorithm s a | s -> a where #
oAuth2encodingAlgorithm :: Lens' s a #
Instances
class HasOAuth2requestUri s a | s -> a where #
oAuth2requestUri :: Lens' s a #
Instances
HasOAuth2requestUri OAuth2Conf URI # | |
Defined in Napkin.Auth.Types |
class HasOAuth2scope s a | s -> a where #
oAuth2scope :: Lens' s a #
Instances
HasOAuth2scope OAuth2Conf (Proxy '["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"]) # | |
Defined in Napkin.Auth.Types oAuth2scope :: Lens' OAuth2Conf (Proxy '["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"]) # |
data OAuth2RunTime #
Instances
Eq OAuth2RunTime # | |
Defined in Napkin.Auth.Types (==) :: OAuth2RunTime -> OAuth2RunTime -> Bool # (/=) :: OAuth2RunTime -> OAuth2RunTime -> Bool # | |
HasOAuth2codeVerifier OAuth2RunTime ByteString # | |
Defined in Napkin.Auth.Types | |
HasOAuth2codeChallenge OAuth2RunTime ByteString # | |
Defined in Napkin.Auth.Types | |
HasOAuth2callbackUrl OAuth2RunTime Text # | |
Defined in Napkin.Auth.Types | |
HasO2runTime OAuth2Env OAuth2RunTime # | |
Defined in Napkin.Auth.Types |
data OAuth2Token #
Instances
class HasAccessToken s a | s -> a where #
accessToken :: Lens' s a #
Instances
HasAccessToken OAuth2Token Text # | |
Defined in Napkin.Auth.Types |
class HasExpiresIn s a | s -> a where #
Instances
HasExpiresIn OAuth2Token Int # | |
Defined in Napkin.Auth.Types |
class HasIdToken s a | s -> a where #
Instances
HasIdToken OAuth2Token Text # | |
Defined in Napkin.Auth.Types idToken :: Lens' OAuth2Token Text # |
class HasRefreshToken s a | s -> a where #
refreshToken :: Lens' s a #
Instances
HasRefreshToken OAuth2Token Text # | |
Defined in Napkin.Auth.Types | |
HasRefreshToken GCredentials Text # | |
Defined in Napkin.Auth.Types |
class HasScope s a | s -> a where #
Instances
HasScope OAuth2Token Text # | |
Defined in Napkin.Auth.Types scope :: Lens' OAuth2Token Text # |
class HasTokenType s a | s -> a where #
Instances
HasTokenType OAuth2Token Text # | |
Defined in Napkin.Auth.Types |
data OAuth2CodeWithSource #
Instances
HasO2codeStore OAuth2Env O2CodeStore # | |
Defined in Napkin.Auth.Types |
type O2CodeStore = MVar (Either AuthEvalError OAuth2CodeWithSource) #
Instances
HasO2runTime OAuth2Env OAuth2RunTime # | |
Defined in Napkin.Auth.Types | |
HasO2conf OAuth2Env OAuth2Conf # | |
Defined in Napkin.Auth.Types | |
HasO2codeStore OAuth2Env O2CodeStore # | |
Defined in Napkin.Auth.Types |
class HasO2codeStore s a | s -> a where #
o2codeStore :: Lens' s a #
Instances
HasO2codeStore OAuth2Env O2CodeStore # | |
Defined in Napkin.Auth.Types |
class HasO2conf s a | s -> a where #
Instances
HasO2conf OAuth2Env OAuth2Conf # | |
Defined in Napkin.Auth.Types |
class HasO2runTime s a | s -> a where #
Instances
HasO2runTime OAuth2Env OAuth2RunTime # | |
Defined in Napkin.Auth.Types |
getOAuthDbPath :: OAuth2Env -> FilePath #
getOAuthPort :: OAuth2Env -> Int #
data GCredentials #
Instances
ToJSON GCredentials # | |
Defined in Napkin.Auth.Types toJSON :: GCredentials -> Value # toEncoding :: GCredentials -> Encoding # toJSONList :: [GCredentials] -> Value # toEncodingList :: [GCredentials] -> Encoding # | |
FromJSON GCredentials # | |
Defined in Napkin.Auth.Types parseJSON :: Value -> Parser GCredentials # parseJSONList :: Value -> Parser [GCredentials] # | |
HasClientSecret GCredentials Text # | |
Defined in Napkin.Auth.Types | |
HasClientId GCredentials Text # | |
Defined in Napkin.Auth.Types | |
HasRefreshToken GCredentials Text # | |
Defined in Napkin.Auth.Types | |
HasCtype GCredentials Text # | |
Defined in Napkin.Auth.Types ctype :: Lens' GCredentials Text # |
class HasCtype s a | s -> a where #
Instances
HasCtype GCredentials Text # | |
Defined in Napkin.Auth.Types ctype :: Lens' GCredentials Text # |