middleware

package
v0.0.0-...-affb33e Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JWTAuthorization

func JWTAuthorization(h http.HandlerFunc, role string, ctx context.Context) http.HandlerFunc

Types

type Claims

type Claims struct {
	ResourceAccess client `json:"resource_access,omitempty"`
	JTI            string `json:"jti,omitempty"`
}

Claims claims component of jwt contains many fields , we need only roles of GoryaServiceClient "gorya":{"gorya":{"roles":["get-timezone","list-policy","delete-policy"]}},

Jump to

Keyboard shortcuts

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