Documentation ¶
Index ¶
Constants ¶
View Source
const (
V1KeySize = 32
)
Variables ¶
View Source
var ( ErrTokenIsNotValid = errors.New("jst: token is not valid") ErrSignatureIsNotValid = errors.New("jst: signature is not valid") ErrTokenHasExpired = errors.New("jst: token has expired") )
View Source
var ( ErrKeyNotFound = func(keyId string) error { return fmt.Errorf("key (%s) not found", keyId) } )
Functions ¶
This section is empty.
Types ¶
type KeyProvider ¶
type KeyProviderMemory ¶
type KeyProviderMemory struct {
// contains filtered or unexported fields
}
func NewKeyProviderMemory ¶
func NewKeyProviderMemory(keys map[string][]byte) *KeyProviderMemory
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func NewProvider ¶
func NewProvider(keyProvider KeyProvider, defaultKey string) (provider *Provider, err error)
func (*Provider) IssueToken ¶
Click to show internal directories.
Click to hide internal directories.