jwt_utils

package
v0.0.0-...-61fa424 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRoles

func CheckRoles(roles []string) gin.HandlerFunc

func GetJwtMiddleware

func GetJwtMiddleware() gin.HandlerFunc

Types

type CustomClaims

type CustomClaims struct {
	Roles []string `json:"https://nistagram/roles"`
	jwt.StandardClaims
}

type JSONWebKeys

type JSONWebKeys struct {
	Kty string   `json:"kty"`
	Kid string   `json:"kid"`
	Use string   `json:"use"`
	N   string   `json:"n"`
	E   string   `json:"e"`
	X5c []string `json:"x5c"`
}

type Jwks

type Jwks struct {
	Keys []JSONWebKeys `json:"keys"`
}

Jump to

Keyboard shortcuts

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