authorization

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2020 License: GPL-3.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAuthorizationMiddleware

func CreateAuthorizationMiddleware(audience string, authorizationServer string) *jwtmiddleware.JWTMiddleware

CreateAuthorizationMiddleware creates authorization middleware with the given parameters

func CreateScopeMiddleware

func CreateScopeMiddleware(scope string, authorizationServer string, audience string) func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)

CreateScopeMiddleware creates a middleware the check the given scope

func DefaultExtractUserID added in v1.1.0

func DefaultExtractUserID(r *http.Request) string

Types

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"`
}

type Response

type Response struct {
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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