Documentation ¶
Index ¶
- func AdminFilter(req *restful.Request, resp *restful.Response, chain *restful.FilterChain)
- func CanImpersonate(vaultToken string) bool
- func CheckAdminPermission(vaultToken string, vc *vault.Config)
- func CheckImpersonatePermission(vaultToken string, vc *vault.Config)
- func GetTokenFromContext(r *restful.Request) string
- func GetTokenFromRequest(r *restful.Request) string
- func ImpersonateFilter(req *restful.Request, resp *restful.Response, chain *restful.FilterChain)
- func IsAdmin(vaultToken string) bool
- func LoginFilter(req *restful.Request, resp *restful.Response, chain *restful.FilterChain)
- func ParseBearerAuth(auth string) (string, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminFilter ¶
func AdminFilter(req *restful.Request, resp *restful.Response, chain *restful.FilterChain)
AdminFilter fail if the user is not an admin
func CheckAdminPermission ¶
checkAdminPermission ...
func CheckImpersonatePermission ¶
CheckImpersonatePermission check if the user can impersonate other
func GetTokenFromContext ¶
func GetTokenFromContext(r *restful.Request) string
GetUserFromContext ...
func GetTokenFromRequest ¶
func GetTokenFromRequest(r *restful.Request) string
func ImpersonateFilter ¶
func ImpersonateFilter(req *restful.Request, resp *restful.Response, chain *restful.FilterChain)
ImpersonateFilter ....
func LoginFilter ¶
func LoginFilter(req *restful.Request, resp *restful.Response, chain *restful.FilterChain)
LoginFilter fail if the user is not logged in
func ParseBearerAuth ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.