jwt

package
v0.1.232 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJwtAud

func GetJwtAud(tokenString string) (string, error)

func GetKeyFromJWKS

func GetKeyFromJWKS(jwksURL, kid string) (*rsa.PublicKey, error)

func GetKeyFromJWKSByteArray

func GetKeyFromJWKSByteArray(body []byte, kid string) (*rsa.PublicKey, error)

func ValidateJWT

func ValidateJWT(tokenString string, server string, skipValidation bool) error

func ValidateJWTWithJWKS

func ValidateJWTWithJWKS(tokenString string, jwksURL string, getKey GetKey, skipValidation bool) error

Types

type GetKey

type GetKey func(jwksURL, kid string) (*rsa.PublicKey, error)

type JWKS

type JWKS struct {
	Keys []json.RawMessage `json:"keys"`
}

Jump to

Keyboard shortcuts

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