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 JWTEmailVerifyAuthorization(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 ¶ added in v0.4.0
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 ¶ added in v0.4.0
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 JWTEmailVerifyAuthorization ¶ added in v0.4.0
JWTEmailVerifyAuthorization verifies whether current request is email verification
func JWTResetPasswordAuthorization ¶ added in v0.4.0
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 ¶ added in v0.3.0
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