Documentation ¶
Index ¶
- Constants
- func AddAuthorizationContextMiddlewareAdapter() controllers.Adapter
- func ApiKeyAuthorizationMiddlewareAdapter(roles []string, claims []string) controllers.Adapter
- func EndAuthorizationMiddlewareAdapter() controllers.Adapter
- func TokenAuthorizationMiddlewareAdapter(roles []string, claims []string) controllers.Adapter
Constants ¶
View Source
const ( AUTHORIZED_BY_KEY = "AUTHORIZED_BY" IS_AUTHORIZED_KEY = "IS_AUTHORIZED" )
Variables ¶
This section is empty.
Functions ¶
func AddAuthorizationContextMiddlewareAdapter ¶ added in v0.0.15
func AddAuthorizationContextMiddlewareAdapter() controllers.Adapter
func ApiKeyAuthorizationMiddlewareAdapter ¶ added in v0.0.15
func ApiKeyAuthorizationMiddlewareAdapter(roles []string, claims []string) controllers.Adapter
func EndAuthorizationMiddlewareAdapter ¶
func EndAuthorizationMiddlewareAdapter() controllers.Adapter
EndAuthorizationMiddlewareAdapter This cleans the context of any previous users token left in memory and rereading all of the default options for the next request
func TokenAuthorizationMiddlewareAdapter ¶
func TokenAuthorizationMiddlewareAdapter(roles []string, claims []string) controllers.Adapter
TokenAuthorizationMiddlewareAdapter validates a Authorization Bearer during a rest api call It can take an array of roles and claims to further validate the token in a more granular view, it also can take an OR option in both if the role or claim are coma separated. For example a claim like "_read,_write" will be valid if the user either has a _read claim or a _write claim making them both valid
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.