Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data structures to define and manipulate tokens
Synopsis
- data TokenType = TOTP
- newtype TokenLabel = TokenLabel {
- unTokenLabel :: Text
- data TokenSecret
- newtype TokenIssuer = TokenIssuer {}
- data TokenAlgorithm
- data TokenDigits
- newtype TokenPeriod = TokenPeriod {}
- data TokenSpec = TokenSpec {}
- newtype TokenIdentifier = TokenIdentifier {}
- type Tokens = HashMap TokenIdentifier TokenSpec
- data Config = Config {}
- getIdentifier :: TokenSpec -> TokenIdentifier
- currentConfigVersion :: Word32
- initialConfig :: Config
Documentation
Type of token TOTP or HOTP (not supported yet)
newtype TokenLabel Source #
Label of the token
Instances
Show TokenLabel Source # | |
Defined in Gamgee.Token showsPrec :: Int -> TokenLabel -> ShowS # show :: TokenLabel -> String # showList :: [TokenLabel] -> ShowS # | |
IsString TokenLabel Source # | |
Defined in Gamgee.Token fromString :: String -> TokenLabel # | |
ToJSON TokenLabel Source # | |
Defined in Gamgee.Token toJSON :: TokenLabel -> Value # toEncoding :: TokenLabel -> Encoding # toJSONList :: [TokenLabel] -> Value # toEncodingList :: [TokenLabel] -> Encoding # | |
FromJSON TokenLabel Source # | |
Defined in Gamgee.Token parseJSON :: Value -> Parser TokenLabel # parseJSONList :: Value -> Parser [TokenLabel] # |
data TokenSecret Source #
Secret used to generate OTPs
Instances
newtype TokenIssuer Source #
Optional issuer of this token
Instances
Show TokenIssuer Source # | |
Defined in Gamgee.Token showsPrec :: Int -> TokenIssuer -> ShowS # show :: TokenIssuer -> String # showList :: [TokenIssuer] -> ShowS # | |
IsString TokenIssuer Source # | |
Defined in Gamgee.Token fromString :: String -> TokenIssuer # | |
ToJSON TokenIssuer Source # | |
Defined in Gamgee.Token toJSON :: TokenIssuer -> Value # toEncoding :: TokenIssuer -> Encoding # toJSONList :: [TokenIssuer] -> Value # toEncodingList :: [TokenIssuer] -> Encoding # | |
FromJSON TokenIssuer Source # | |
Defined in Gamgee.Token parseJSON :: Value -> Parser TokenIssuer # parseJSONList :: Value -> Parser [TokenIssuer] # |
data TokenAlgorithm Source #
Instances
data TokenDigits Source #
Instances
Show TokenDigits Source # | |
Defined in Gamgee.Token showsPrec :: Int -> TokenDigits -> ShowS # show :: TokenDigits -> String # showList :: [TokenDigits] -> ShowS # | |
ToJSON TokenDigits Source # | |
Defined in Gamgee.Token toJSON :: TokenDigits -> Value # toEncoding :: TokenDigits -> Encoding # toJSONList :: [TokenDigits] -> Value # toEncodingList :: [TokenDigits] -> Encoding # | |
FromJSON TokenDigits Source # | |
Defined in Gamgee.Token parseJSON :: Value -> Parser TokenDigits # parseJSONList :: Value -> Parser [TokenDigits] # |
newtype TokenPeriod Source #
Refresh interval of the token in seconds
Instances
TokenSpec | |
|
Instances
newtype TokenIdentifier Source #
Instances
Instances
Generic Config Source # | |
ToJSON Config Source # | |
Defined in Gamgee.Token | |
FromJSON Config Source # | |
type Rep Config Source # | |
Defined in Gamgee.Token type Rep Config = D1 ('MetaData "Config" "Gamgee.Token" "gamgee-1.2.2-J40rGWe8DSNLUE2qXWQxyM" 'False) (C1 ('MetaCons "Config" 'PrefixI 'True) (S1 ('MetaSel ('Just "configVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32) :*: S1 ('MetaSel ('Just "configTokens") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Tokens))) |