Documentation ¶
Index ¶
- func CORS() web.MiddlewareFunc
- func CheckAuthTokenOrigin() web.MiddlewareFunc
- func CheckTenantPrivacy() web.MiddlewareFunc
- func ClientCache(d time.Duration) web.MiddlewareFunc
- func Compress() web.MiddlewareFunc
- func IsAuthenticated() web.MiddlewareFunc
- func IsAuthorized(roles ...models.Role) web.MiddlewareFunc
- func MultiTenant() web.MiddlewareFunc
- func Noop() web.MiddlewareFunc
- func OnlyActiveTenants() web.MiddlewareFunc
- func RequireTenant() web.MiddlewareFunc
- func Secure() web.MiddlewareFunc
- func SingleTenant() web.MiddlewareFunc
- func Tenant() web.MiddlewareFunc
- func User() web.MiddlewareFunc
- func WebSetup() web.MiddlewareFunc
- func WorkerSetup() worker.MiddlewareFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CORS ¶ added in v0.14.0
func CORS() web.MiddlewareFunc
CORS adds Cross-Origin Resource Sharing response headers
func CheckAuthTokenOrigin ¶ added in v0.15.0
func CheckAuthTokenOrigin() web.MiddlewareFunc
CheckAuthTokenOrigin blocks API-originated AuthToken requests a non-API resource
func CheckTenantPrivacy ¶ added in v0.12.0
func CheckTenantPrivacy() web.MiddlewareFunc
CheckTenantPrivacy blocks requests of unauthenticated users for private tenants
func ClientCache ¶ added in v0.9.0
func ClientCache(d time.Duration) web.MiddlewareFunc
ClientCache adds Cache-Control header for X seconds
func Compress ¶ added in v0.7.0
func Compress() web.MiddlewareFunc
Compress returns a middleware which compresses HTTP response using gzip compression
func IsAuthenticated ¶
func IsAuthenticated() web.MiddlewareFunc
IsAuthenticated blocks non-authenticated requests
func IsAuthorized ¶
func IsAuthorized(roles ...models.Role) web.MiddlewareFunc
IsAuthorized blocks non-authorized requests
func MultiTenant ¶
func MultiTenant() web.MiddlewareFunc
MultiTenant extract tenant information from hostname and inject it into current context
func OnlyActiveTenants ¶ added in v0.6.0
func OnlyActiveTenants() web.MiddlewareFunc
OnlyActiveTenants blocks requests for inactive tenants
func RequireTenant ¶ added in v0.15.0
func RequireTenant() web.MiddlewareFunc
RequireTenant returns 404 if tenant is not available
func Secure ¶ added in v0.12.0
func Secure() web.MiddlewareFunc
Secure adds web security related Http Headers to response
func SingleTenant ¶
func SingleTenant() web.MiddlewareFunc
SingleTenant inject default tenant into current context
func Tenant ¶
func Tenant() web.MiddlewareFunc
Tenant adds either SingleTenant or MultiTenant to the pipeline
func User ¶ added in v0.15.0
func User() web.MiddlewareFunc
User gets JWT Auth token from cookie and insert into context
func WebSetup ¶ added in v0.10.0
func WebSetup() web.MiddlewareFunc
WebSetup current context with some services
func WorkerSetup ¶ added in v0.10.0
func WorkerSetup() worker.MiddlewareFunc
WorkerSetup current context with some services
Types ¶
This section is empty.