token

package
v0.0.0-...-adf365b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

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

func ParsePublicKey

func ParsePublicKey(key []byte) (*rsa.PublicKey, error)

ParsePublicKey parses a []byte representation of a public key into a rsa.PublicKey instance

Types

type Manager

type Manager interface {
	Generate(account.Identity) (string, error)
	Extract(string) (*account.Identity, error)
	Locate(ctx context.Context) (uuid.UUID, error)
}

Manager generate and find auth token information

func NewManager

func NewManager(publicKey *rsa.PublicKey, privateKey *rsa.PrivateKey) Manager

NewManager returns a new token Manager for handling creation of tokens

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL