jwt

package
v2.10.9 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Claims

func Claims(in interface{}) jwtgo.Claims

func ExpirationTime

func ExpirationTime(m jwtgo.MapClaims) (time.Time, error)

ExpirationTime returns the expiration as a time.Time

func Float64Field

func Float64Field(claims jwtgo.MapClaims, fieldName string) float64

Float64Field extracts a field from the claims as a float64

func GetGroups

func GetGroups(mapClaims jwtgo.MapClaims, scopes []string) []string

func GetScopeValues

func GetScopeValues(claims jwtgo.MapClaims, scopes []string) []string

GetScopeValues extracts the values of specified scopes from the claims

func IsMember

func IsMember(claims jwtgo.Claims, groups []string, scopes []string) bool

IsMember returns whether or not the user's claims is a member of any of the groups

func IsValid

func IsValid(token string) bool

func IssuedAt

func IssuedAt(m jwtgo.MapClaims) (int64, error)

IssuedAt returns the issued at as an int64

func IssuedAtTime

func IssuedAtTime(m jwtgo.MapClaims) (time.Time, error)

IssuedAtTime returns the issued at as a time.Time

func MapClaims

func MapClaims(claims jwtgo.Claims) (jwtgo.MapClaims, error)

MapClaims converts a jwt.Claims to a MapClaims

func StringField

func StringField(claims jwtgo.MapClaims, fieldName string) string

StringField extracts a field from the claims as a string

Types

This section is empty.

Jump to

Keyboard shortcuts

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