jwt

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRSA

func NewRSA() (token.Service, error)

NewRSA returns an RSATokenService initialized and ready for use.

Types

type RSAToken

type RSAToken struct {
	token.Claims
	jwt.StandardClaims
}

An RSAToken is a token that provides both the token.Claims required components and the jtw.StandardClaims.

type RSATokenService

type RSATokenService struct {
	// contains filtered or unexported fields
}

The RSATokenService provides RSA tokens and the means to verify them.

func (*RSATokenService) Generate

func (s *RSATokenService) Generate(claims token.Claims, config token.Config) (string, error)

Generate generates a token signed by an RSA key.

func (*RSATokenService) GetKeys

func (s *RSATokenService) GetKeys() error

GetKeys obtains the keys for an RSATokenService. If the keys are not available and it is not disabled, then a keypair will be generated.

func (*RSATokenService) Validate

func (s *RSATokenService) Validate(tkn string) (token.Claims, error)

Validate validates a token signed by an RSA key.

Jump to

Keyboard shortcuts

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