auth

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrForbidden = errors.New("forbidden")
)

Functions

func Authenticate

func Authenticate(r *http.Request, requestVars map[string]string) (string, error)

func KeystoneMiddleware

func KeystoneMiddleware(next http.Handler) (http.Handler, error)

Middleware Keystone token injector, also implements goslo policy checker

func ProjectScopeForRequest

func ProjectScopeForRequest(r *http.Request) (string, error)

ProjectScopeForRequest helper for getting project id

func TokenFrom

func TokenFrom(r *http.Request) *gopherpolicy.Token

func UserForRequest

func UserForRequest(r *http.Request) (audittools.UserInfo, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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