Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultSessionGenerator defines the default session id generator DefaultSessionGenerator = func() string { return uniuri.NewLen(64) } // NoOperationProcessor defines the copy source processor NoOperationProcessor = func(payload []byte) ([]byte, error) { return payload, nil } // DefaultEncryptor is the default data encryptor for challenge DefaultEncryptor = NoOperationProcessor )
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Options)
Option defines forge option contract option function
func WithDecryptor ¶
func WithDecryptor(decryptor ProcessorFunc) Option
WithDecryptor defines the challenge decryptor
func WithEncryptor ¶
func WithEncryptor(encryptor ProcessorFunc) Option
WithEncryptor defines the challenge encryptor
func WithExpiration ¶
WithExpiration defines the expiration interval
func WithRandomSessionID ¶
func WithRandomSessionID() Option
WithRandomSessionID defines the SessionId generation
func WithSessionIDGenerator ¶
func WithSessionIDGenerator(generator SessionIDGeneratorFunc) Option
WithSessionIDGenerator defines the SessionId generation function
type Options ¶
type Options struct { Expiration time.Duration IDGenerator SessionIDGeneratorFunc Encryptor ProcessorFunc Decryptor ProcessorFunc }
Options for challenge forging
type ProcessorFunc ¶
ProcessorFunc contract for challenge pre/post processing
type SessionIDGeneratorFunc ¶
type SessionIDGeneratorFunc func() string
SessionIDGeneratorFunc is the contract for Session ID generation implementation
Click to show internal directories.
Click to hide internal directories.