Documentation ¶
Index ¶
- func HasScope(user *web.UserContext, scope string) (bool, error)
- func NewAndAuthorizer(authorizers ...httpsec.Authorizer) httpsec.Authorizer
- func NewBaseAuthorizer(...) *baseAuthorizer
- func NewClientIDSuffixAuthorizer(trustedClientIDSuffix string, level web.AccessLevel) httpsec.Authorizer
- func NewOauthClientAuthorizer(clientID string, level web.AccessLevel) http.Authorizer
- func NewScopesAuthorizer(scopes []string, level web.AccessLevel) httpsec.Authorizer
- func PrefixScopes(space string, scopes ...string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasScope ¶ added in v0.10.0
func HasScope(user *web.UserContext, scope string) (bool, error)
Checks whether the user has the requested scope
func NewAndAuthorizer ¶
func NewAndAuthorizer(authorizers ...httpsec.Authorizer) httpsec.Authorizer
func NewBaseAuthorizer ¶
func NewBaseAuthorizer(userProcessingFunc func(context.Context, *web.UserContext) (httpsec.Decision, web.AccessLevel, error)) *baseAuthorizer
func NewClientIDSuffixAuthorizer ¶
func NewClientIDSuffixAuthorizer(trustedClientIDSuffix string, level web.AccessLevel) httpsec.Authorizer
NewClientIDSuffixAuthorizer returns OAuth authorizer
func NewOauthClientAuthorizer ¶
func NewOauthClientAuthorizer(clientID string, level web.AccessLevel) http.Authorizer
func NewScopesAuthorizer ¶
func NewScopesAuthorizer(scopes []string, level web.AccessLevel) httpsec.Authorizer
func PrefixScopes ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.