filters

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CurrentUserAttr      = "bke_current_user"
	CurrentCluster       = "bke_current_cluster"
	CurrentUserTokenType = "bke_current_usertoken_type"
)

Variables

This section is empty.

Functions

func AccessTokenAuthenticate

func AccessTokenAuthenticate(request *restful.Request, response *restful.Response, chain *restful.FilterChain)

accessTokenAuthenticate authenticates the user using access_token parameter in query string.

func AuthenticatedRequired

func AuthenticatedRequired(request *restful.Request, response *restful.Response, chain *restful.FilterChain)

AuthenticatedRequired aborts current request if it isn't authenticated, which means there is no "CurrentUserAttr" attribute can be found in request.

func ClusterIdVerify

func ClusterIdVerify(request *restful.Request, response *restful.Response, chain *restful.FilterChain)

ClusterVerify verifies if given cluster_id is valid.

func GetCluster

func GetCluster(req *restful.Request) *m.Cluster

func GetUser

func GetUser(req *restful.Request) *m.User

Get CurrentUser from request object

func GetUserTokenType

func GetUserTokenType(req *restful.Request) int

func SuperTokenAuthenticate

func SuperTokenAuthenticate(request *restful.Request, response *restful.Response, chain *restful.FilterChain)

SuperTokenAuthenticate authenticates current user whether is super user by bearer token

func TokenAuthenticate

func TokenAuthenticate(request *restful.Request, response *restful.Response, chain *restful.FilterChain)

tokenAuthenticate authenticates current user by bearer token

Types

This section is empty.

Jump to

Keyboard shortcuts

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