jwt

package
v1.8.7 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 5 Imported by: 42

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Claims added in v1.2.0

func Claims(in interface{}) jwtgo.Claims

func Float64Field added in v1.7.12

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 GetID added in v1.5.3

func GetID(m jwtgo.MapClaims) (string, error)

func GetScopeValues added in v1.0.0

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

GetScopeValues extracts the values of specified scopes from the claims

func IsMember added in v1.2.0

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 IssuedAt added in v1.7.12

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

IssuedAt returns the issued at as an int64

func IssuedAtTime added in v1.7.12

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 added in v1.7.12

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