Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidToken = errors.New("invalid token") ErrTokenUnknownType = errors.New("unknown token type") )
Functions ¶
This section is empty.
Types ¶
type ClientAPIToken ¶
type ClientAPIToken struct {
jwt.RegisteredClaims
}
type TokenService ¶
type TokenService struct {
Conf *config.ClientToken
}
func NewTokenService ¶
func NewTokenService(conf *config.ClientToken) *TokenService
func (*TokenService) IssueToken ¶
func (ts *TokenService) IssueToken() (string, error)
func (*TokenService) ValidateToken ¶
func (ts *TokenService) ValidateToken(clientJWT string) (*ClientAPIToken, error)
type TokenValidator ¶
type TokenValidator interface {
ValidateToken(clientJWT string) (*ClientAPIToken, error)
}
Click to show internal directories.
Click to hide internal directories.