jwt

package
v1.5.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HmacSampleSecret []byte

Functions

func BuildAuthHeader

func BuildAuthHeader(appConfig *config.AppConfig, expiredToken bool, signingKeyFile string, signingKeyType string, c Claim) string

BuildAuthHeader builds the authorization header with a JWT bearer token

func GenerateDefaultSignedToken

func GenerateDefaultSignedToken(appConfig *config.AppConfig) string

func GenerateSignedToken

func GenerateSignedToken(appConfig *config.AppConfig, expiredToken bool, signingKeyFile string, signingKeyType string, c Claim) string

GenerateSignedToken generates and sign a jwt token

func GetSigningKey

func GetSigningKey(signingKeyFile string, rsaKeyType string) *jose.JSONWebKey

GetSigningKey converts rsaPrivateKey into a private/public JSONWebKey

Types

type Claim

type Claim struct {
	Key   string
	Value interface{}
}

Jump to

Keyboard shortcuts

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