jwt

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ExpireTimeMinutes = 10
View Source
const RSAKeyDir = "mgmt"

Variables

This section is empty.

Functions

func CreateToken

func CreateToken(signKeyName, issuer string, aud []string) (string, error)

CreateToken Only for tests

func GetPrivateKeyWithKeyName

func GetPrivateKeyWithKeyName(keyName string) (*rsa.PrivateKey, error)

func GetPublicKey

func GetPublicKey(keyName string) (*rsa.PublicKey, error)

Types

type Token

type Token struct {
	jwt.RegisteredClaims
}

func ParseToken

func ParseToken(th string) (*Token, error)

Jump to

Keyboard shortcuts

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