roleenforcemdl

package
v2.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enforce

func Enforce(req *http.Request, URL, jwtKey, groupKey string) bool

Enforce Enforce

func GetGroupFromToken

func GetGroupFromToken(req *http.Request, jwtKey, groupKey string) ([]string, error)

func GetGroupNames

func GetGroupNames(decodedToken jwt.MapClaims, groupKey string) ([]string, error)

GetGroupNames gets the group names from the request.

func LoadRoleConfiguration

func LoadRoleConfiguration(csvFilePath string)

func RegisterUser

func RegisterUser(group, URL string, isAllowed bool)

RegisterUser - RegisterUser register use

Types

type URLGroupMapping

type URLGroupMapping struct {
	All        bool
	Allowed    map[string]bool
	NotAllowed map[string]bool
}

URLGroupMapping URLGroupMapping

Jump to

Keyboard shortcuts

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