chore: move jwt models into auth/jwt (#61862)

* chore: move jwt models into auth/jwt
This commit is contained in:
Kristin Laemmert
2023-01-20 13:11:06 -05:00
committed by GitHub
parent fb6df56464
commit cd08f2575a
13 changed files with 59 additions and 56 deletions
-27
View File
@@ -1,27 +0,0 @@
package models
import (
"context"
)
type JWTClaims map[string]interface{}
type JWTService interface {
Verify(ctx context.Context, strToken string) (JWTClaims, error)
}
type FakeJWTService struct {
VerifyProvider func(context.Context, string) (JWTClaims, error)
}
func (s *FakeJWTService) Verify(ctx context.Context, token string) (JWTClaims, error) {
return s.VerifyProvider(ctx, token)
}
func NewFakeJWTService() *FakeJWTService {
return &FakeJWTService{
VerifyProvider: func(ctx context.Context, token string) (JWTClaims, error) {
return JWTClaims{}, nil
},
}
}