Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTokenIsNotValid = errors.New("The token is not valid") ErrSignatureIsNotValid = errors.New("Signature is not valid") ErrTokenHasExpired = errors.New("The token has expired") ErrAlgorithmIsNotValid = fmt.Errorf("Algorithm is not valid. Valid algorithms values are: [%s, %s]", AlgorithmHS256, AlgorithmHS512) )
Functions ¶
This section is empty.
Types ¶
type NewProviderOptions ¶
type NewProviderOptions struct {
VerifyingKeys [][]byte
}
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func NewProvider ¶
func NewProvider(signingSecretKey []byte, algorithm Algorithm, options *NewProviderOptions) (provider *Provider, err error)
func (*Provider) IssueToken ¶
func (provider *Provider) IssueToken(data any, options *TokenOptions) (token string, err error)
Click to show internal directories.
Click to hide internal directories.