jwt

package
v0.0.0-...-ef901e4 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractJti

func ExtractJti(jwtStr string) (*domain.JwtJti, error)

ExtractJti read "jti" claim of JWT. Does not perform any JWT validation.

func IsECDSA

func IsECDSA(alg domain.JwtAlg) bool

IsECDSA returns true for ES*** algorithms

func IsHMAC

func IsHMAC(alg domain.JwtAlg) bool

IsHMAC returns true for HS*** algorithms

func IsRSA

func IsRSA(alg domain.JwtAlg) bool

IsRSA returns true for RS*** algorithms

func LoadKey

func LoadKey(alg domain.JwtAlg, keyFilePath string, privateKey bool) (interface{}, error)

LoadKey loads public/private key file

func LoadVerificationKey

func LoadVerificationKey(alg domain.JwtAlg, keyFilePath string) (interface{}, error)

LoadVerificationKey loads public key file

func ValidateAlg

func ValidateAlg(alg domain.JwtAlg) error

ValidateAlg validates JWT alg

func ValidateVerificationKey

func ValidateVerificationKey(alg domain.JwtAlg, keyFilePath string) error

ValidateVerificationKey validates plain-text representation of public key

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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