Documentation ¶
Index ¶
- func FromAccessToken(ctx context.Context) string
- func FromContext(ctx context.Context) (token *jwt.RegisteredClaims, ok bool)
- func FromUserID(ctx context.Context) string
- func FromUserM(ctx context.Context) *model.UserM
- func NewAccessToken(ctx context.Context, accessToken string) context.Context
- func NewContext(ctx context.Context, info *jwt.RegisteredClaims) context.Context
- func NewUserID(ctx context.Context, userID string) context.Context
- func NewUserM(ctx context.Context, user *model.UserM) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromAccessToken ¶
FromAccessToken extract accessToken from context.
func FromContext ¶
FromContext extract auth info from context.
func FromUserID ¶
FromUserID extract userID from context.
func NewAccessToken ¶
NewAccessToken put accessToken into context.
func NewContext ¶
NewContext put auth info into context.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.