gamgee-1.2.2: Tool for generating TOTP MFA tokens.
Safe HaskellNone
LanguageHaskell2010

Gamgee.Token

Description

Data structures to define and manipulate tokens

Synopsis

Documentation

data TokenType Source #

Type of token TOTP or HOTP (not supported yet)

Constructors

TOTP 

Instances

Instances details
Show TokenType Source # 
Instance details

Defined in Gamgee.Token

ToJSON TokenType Source # 
Instance details

Defined in Gamgee.Token

FromJSON TokenType Source # 
Instance details

Defined in Gamgee.Token

newtype TokenLabel Source #

Label of the token

Constructors

TokenLabel 

Fields

Instances

Instances details
Show TokenLabel Source # 
Instance details

Defined in Gamgee.Token

IsString TokenLabel Source # 
Instance details

Defined in Gamgee.Token

ToJSON TokenLabel Source # 
Instance details

Defined in Gamgee.Token

FromJSON TokenLabel Source # 
Instance details

Defined in Gamgee.Token

data TokenSecret Source #

Secret used to generate OTPs

Instances

Instances details
Show TokenSecret Source # 
Instance details

Defined in Gamgee.Token

Generic TokenSecret Source # 
Instance details

Defined in Gamgee.Token

Associated Types

type Rep TokenSecret :: Type -> Type #

ToJSON TokenSecret Source # 
Instance details

Defined in Gamgee.Token

FromJSON TokenSecret Source # 
Instance details

Defined in Gamgee.Token

type Rep TokenSecret Source # 
Instance details

Defined in Gamgee.Token

type Rep TokenSecret = D1 ('MetaData "TokenSecret" "Gamgee.Token" "gamgee-1.2.2-J40rGWe8DSNLUE2qXWQxyM" 'False) (C1 ('MetaCons "TokenSecretPlainText" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "TokenSecretAES256" 'PrefixI 'True) (S1 ('MetaSel ('Just "tokenSecretAES256IV") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "tokenSecretAES256Data") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

newtype TokenIssuer Source #

Optional issuer of this token

Constructors

TokenIssuer 

Fields

Instances

Instances details
Show TokenIssuer Source # 
Instance details

Defined in Gamgee.Token

IsString TokenIssuer Source # 
Instance details

Defined in Gamgee.Token

ToJSON TokenIssuer Source # 
Instance details

Defined in Gamgee.Token

FromJSON TokenIssuer Source # 
Instance details

Defined in Gamgee.Token

data TokenAlgorithm Source #

Instances

Instances details
Show TokenAlgorithm Source # 
Instance details

Defined in Gamgee.Token

Generic TokenAlgorithm Source # 
Instance details

Defined in Gamgee.Token

Associated Types

type Rep TokenAlgorithm :: Type -> Type #

ToJSON TokenAlgorithm Source # 
Instance details

Defined in Gamgee.Token

FromJSON TokenAlgorithm Source # 
Instance details

Defined in Gamgee.Token

type Rep TokenAlgorithm Source # 
Instance details

Defined in Gamgee.Token

type Rep TokenAlgorithm = D1 ('MetaData "TokenAlgorithm" "Gamgee.Token" "gamgee-1.2.2-J40rGWe8DSNLUE2qXWQxyM" 'False) (C1 ('MetaCons "AlgorithmSHA1" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "AlgorithmSHA256" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AlgorithmSHA512" 'PrefixI 'False) (U1 :: Type -> Type)))

data TokenDigits Source #

Constructors

Digits6 
Digits8 

Instances

Instances details
Show TokenDigits Source # 
Instance details

Defined in Gamgee.Token

ToJSON TokenDigits Source # 
Instance details

Defined in Gamgee.Token

FromJSON TokenDigits Source # 
Instance details

Defined in Gamgee.Token

newtype TokenPeriod Source #

Refresh interval of the token in seconds

Constructors

TokenPeriod 

Instances

Instances details
Enum TokenPeriod Source # 
Instance details

Defined in Gamgee.Token

Eq TokenPeriod Source # 
Instance details

Defined in Gamgee.Token

Integral TokenPeriod Source # 
Instance details

Defined in Gamgee.Token

Num TokenPeriod Source # 
Instance details

Defined in Gamgee.Token

Ord TokenPeriod Source # 
Instance details

Defined in Gamgee.Token

Real TokenPeriod Source # 
Instance details

Defined in Gamgee.Token

Show TokenPeriod Source # 
Instance details

Defined in Gamgee.Token

ToJSON TokenPeriod Source # 
Instance details

Defined in Gamgee.Token

FromJSON TokenPeriod Source # 
Instance details

Defined in Gamgee.Token

data TokenSpec Source #

Constructors

TokenSpec 

Fields

Instances

Instances details
Show TokenSpec Source # 
Instance details

Defined in Gamgee.Token

Generic TokenSpec Source # 
Instance details

Defined in Gamgee.Token

Associated Types

type Rep TokenSpec :: Type -> Type #

ToJSON TokenSpec Source # 
Instance details

Defined in Gamgee.Token

FromJSON TokenSpec Source # 
Instance details

Defined in Gamgee.Token

type Rep TokenSpec Source # 
Instance details

Defined in Gamgee.Token

newtype TokenIdentifier Source #

Constructors

TokenIdentifier 

Instances

Instances details
Eq TokenIdentifier Source # 
Instance details

Defined in Gamgee.Token

Show TokenIdentifier Source # 
Instance details

Defined in Gamgee.Token

IsString TokenIdentifier Source # 
Instance details

Defined in Gamgee.Token

Semigroup TokenIdentifier Source # 
Instance details

Defined in Gamgee.Token

Hashable TokenIdentifier Source # 
Instance details

Defined in Gamgee.Token

ToJSON TokenIdentifier Source # 
Instance details

Defined in Gamgee.Token

ToJSONKey TokenIdentifier Source # 
Instance details

Defined in Gamgee.Token

FromJSON TokenIdentifier Source # 
Instance details

Defined in Gamgee.Token

FromJSONKey TokenIdentifier Source # 
Instance details

Defined in Gamgee.Token

ToString TokenIdentifier Source # 
Instance details

Defined in Gamgee.Token

data Config Source #

Constructors

Config 

Instances

Instances details
Generic Config Source # 
Instance details

Defined in Gamgee.Token

Associated Types

type Rep Config :: Type -> Type #

Methods

from :: Config -> Rep Config x #

to :: Rep Config x -> Config #

ToJSON Config Source # 
Instance details

Defined in Gamgee.Token

FromJSON Config Source # 
Instance details

Defined in Gamgee.Token

type Rep Config Source # 
Instance details

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)))