jose

package
v0.0.0-...-6e34d32 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JWSTokenIssuer

type JWSTokenIssuer struct {
	Key          crypto.PrivateKey
	KeyAlgorithm string
}

JWSTokenIssuer issues and validates JSON web signature tokens.

func (*JWSTokenIssuer) Issue

func (s *JWSTokenIssuer) Issue() (string, error)

Issue issues a new JWT token signed with the authority key and valid for one day. The signed JWT token is returned in the RFC 7519 compact serialization format.

func (*JWSTokenIssuer) Validate

func (s *JWSTokenIssuer) Validate(t string) error

Validate validates the JWT token was signed with the authority key and has not yet expired. The signed JWT token is expected to be in the RFC 7519 compact serialization format.

Jump to

Keyboard shortcuts

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