Documentation ¶
Index ¶
- Variables
- func AddAuthToRequest(request *http.Request)
- func AddAuthToRequestForUser(request *http.Request, userName string)
- func AuthenticateCASUser(next http.Handler) http.Handler
- func AuthorizeRequest(role, resourceType string, resourceID func(echo.Context) string) func(echo.HandlerFunc) echo.HandlerFunc
- func CheckHeaderBasedAuth(next echo.HandlerFunc) echo.HandlerFunc
- func CheckRolesForUser(user string, accessKey string, role string, resourceID string, ...) (bool, error)
- func GetGroupsForUser(user string) ([]string, *nerr.E)
- func GetUsersByGroup(group string) ([]structs.Person, *nerr.E)
- func LookupResourceFromAddress(ctx echo.Context) string
Constants ¶
This section is empty.
Variables ¶
View Source
var JWTConfig middleware.JWTConfig
View Source
var JWTTTL int
Functions ¶
func AddAuthToRequest ¶
AddAuthToRequest to add authorization headers to a request. For use in a client
func AddAuthToRequestForUser ¶
AddAuthToRequestForUser to add authorization headers to a request. For use in a client
func AuthorizeRequest ¶
func AuthorizeRequest(role, resourceType string, resourceID func(echo.Context) string) func(echo.HandlerFunc) echo.HandlerFunc
AuthorizeRequest is an echo middleware function that will check the authorization of a user for a specific resource.
func CheckHeaderBasedAuth ¶
func CheckHeaderBasedAuth(next echo.HandlerFunc) echo.HandlerFunc
func CheckRolesForUser ¶
func CheckRolesForUser(user string, accessKey string, role string, resourceID string, resourceType string) (bool, error)
CheckRolesForUser to check authorization of a user for a specific resource. For use in an endpoint receiving requests
func GetGroupsForUser ¶
GetGroupsForUser gets a list of groups that the user belongs to
func GetUsersByGroup ¶
GetUsersByGroup gets the list of users in a group
func LookupResourceFromAddress ¶
LookupResourceFromAddress uses the ":address" parameter from the endpoint and returns the resourceID requested.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.