Documentation ¶
Index ¶
- func AmapApiProxyAuthCookie(c *core.Context, config *settings.Config)
- func JWTAuthorization(c *core.Context)
- func JWTAuthorizationByCookie(c *core.Context)
- func JWTAuthorizationByQueryString(c *core.Context)
- func JWTResetPasswordAuthorization(c *core.Context)
- func JWTTwoFactorAuthorization(c *core.Context)
- func Recovery(c *core.Context)
- func RequestId(config *settings.Config) core.MiddlewareHandlerFunc
- func RequestLog(c *core.Context)
- func ServerSettingsCookie(config *settings.Config) core.MiddlewareHandlerFunc
- type TokenSourceType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AmapApiProxyAuthCookie ¶
AmapApiProxyAuthCookie adds amap api proxy auth cookie to cookies in response
func JWTAuthorization ¶
JWTAuthorization verifies whether current request is valid by jwt token in header
func JWTAuthorizationByCookie ¶
JWTAuthorizationByCookie verifies whether current request is valid by jwt token in cookie
func JWTAuthorizationByQueryString ¶
JWTAuthorizationByQueryString verifies whether current request is valid by jwt token in query string
func JWTResetPasswordAuthorization ¶
JWTResetPasswordAuthorization verifies whether current request is password reset
func JWTTwoFactorAuthorization ¶
JWTTwoFactorAuthorization verifies whether current request is valid by 2fa passcode
func RequestId ¶
func RequestId(config *settings.Config) core.MiddlewareHandlerFunc
RequestId generates a new request id and add it to context and response header
func ServerSettingsCookie ¶
func ServerSettingsCookie(config *settings.Config) core.MiddlewareHandlerFunc
ServerSettingsCookie adds server settings to cookies in response
Types ¶
type TokenSourceType ¶
type TokenSourceType byte
TokenSourceType represents token source
const ( TOKEN_SOURCE_TYPE_HEADER TokenSourceType = 1 TOKEN_SOURCE_TYPE_ARGUMENT TokenSourceType = 2 TOKEN_SOURCE_TYPE_COOKIE TokenSourceType = 3 )
Token source types