Documentation ¶
Overview ¶
Package token is used to manage the creation and validation of the credentials used for authenthication.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RSAPrivateKey = `` /* 1678-byte string literal not displayed */
RSAPrivateKey for signing JWT Tokens ssh-keygen -f alm_rsa
View Source
var RSAPublicKey = `` /* 450-byte string literal not displayed */
RSAPublicKey for verifying JWT Tokens openssl rsa -in alm_rsa -pubout -out alm_rsa.pub
Functions ¶
func ParsePrivateKey ¶
func ParsePrivateKey(key []byte) (*rsa.PrivateKey, error)
ParsePrivateKey parses a []byte representation of a private key into a rsa.PrivateKey instance
Types ¶
type Manager ¶
type Manager interface { Extract(string) (*account.Identity, error) Locate(ctx context.Context) (uuid.UUID, error) PublicKey() *rsa.PublicKey }
Manager generate and find auth token information
func NewManager ¶
NewManager returns a new token Manager for handling tokens
func NewManagerWithPrivateKey ¶
func NewManagerWithPrivateKey(privateKey *rsa.PrivateKey) Manager
NewManagerWithPrivateKey returns a new token Manager for handling creation of tokens with both private and pulic keys
Click to show internal directories.
Click to hide internal directories.