Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JwtTokenGenerator ¶
func JwtTokenGenerator( clientStore store.ClientStore, tokenStore store.TokenStore, rolesFunc JwtRolesGenerator, authoritiesFunc JwtAuthoritiesGenerator, payloadFunc JwtCustomPayloadGenerator) gin.HandlerFunc
JwtTokenGenerator 生成JWT token
Types ¶
type JwtAuthoritiesGenerator ¶
Jwt中的权限信息
func DefaultJwtAuthoritiesGenerator ¶ added in v1.0.8
func DefaultJwtAuthoritiesGenerator() JwtAuthoritiesGenerator
DefaultJwtAuthoritiesGenerator 默认权限数据生成器
type JwtCustomPayloadGenerator ¶
JwtCustomPayloadGenerator Jwt Token Payload 自定义内容生成器
func DefaultJwtCustomPayloadGenerator ¶ added in v1.0.8
func DefaultJwtCustomPayloadGenerator() JwtCustomPayloadGenerator
DefaultJwtCustomPayloadGenerator 默认自定义Payload生成器
type JwtRolesGenerator ¶
Jwt中的角色信息
func DefaultJwtRolesGenerator ¶ added in v1.0.8
func DefaultJwtRolesGenerator() JwtRolesGenerator
DefaultJwtRolesGenerator 默认角色数据生成器
type TokenHandlerForm ¶
type TokenHandlerForm struct { GrantType common.GrantType `form:"grant_type" json:"grant_type"` ClientId string `form:"client_id" json:"client_id"` ClientSecret string `form:"client_secret" json:"client_secret"` UserName string `form:"userName" json:"userName"` Password string `form:"password" json:"password"` RefreshToken string `form:"refresh_token" json:"refresh_token"` }
TokenHandlerForm token请求数据体
Click to show internal directories.
Click to hide internal directories.