Help us shape the future of Go! Take the 2026 Go Developer Survey

jwt

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: Apache-2.0 Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Claims

func Claims(in interface{}) jwt.Claims

func GetField

func GetField(claims jwt.MapClaims, fieldName string) string

GetField extracts a field from the claims as a string

func GetFieldInterface added in v0.4.33

func GetFieldInterface(claims jwt.MapClaims, fieldName string) interface{}

GetFieldInterface extracts a field from the claims as an interface

func GetIssuedAt

func GetIssuedAt(m jwt.MapClaims) (int64, error)

GetIssuedAt returns the issued at as an int64

func GetScopeValues

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

GetScopeValues extracts the values of specified scopes from the claims

func IsMember

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

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

func MapClaims

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

MapClaims converts a jwt.Claims to a MapClaims

Types

This section is empty.

Jump to

Keyboard shortcuts

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