generated from VLADIMIR/template
fix
This commit is contained in:
@@ -10,7 +10,6 @@ func ContextWithClaims(ctx context.Context, claims *JWTClaims) context.Context {
|
||||
return context.WithValue(ctx, claimsContextKey{}, claims)
|
||||
}
|
||||
|
||||
// ClaimsFromContext возвращает данные аутентификации, сохранённые в ctx.
|
||||
func ClaimsFromContext(ctx context.Context) (*JWTClaims, bool) {
|
||||
claims, ok := ctx.Value(claimsContextKey{}).(*JWTClaims)
|
||||
return claims, ok && claims != nil
|
||||
|
||||
Reference in New Issue
Block a user