Documentation ¶
Index ¶
- func GenerateToken(secret ed25519.PrivateKey, hash string, claims interface{}, ...) (string, error)
- func GetClaimsFromJwt(claims *jwt.MapClaims) (utils.IClaims, error)
- func ValidateToken(token string, secret ed25519.PublicKey, ttl time.Duration) (*jwt.MapClaims, error)
- func ValidateTokenClaim(token string, secret ed25519.PublicKey, ttl time.Duration) (utils.IClaims, error)
- type AuthenticatorService
- type IAccessToken
- type IAuthenticator
- type IRoleValidatorHandler
- type ISignInData
- type IUserinfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateToken ¶ added in v1.0.2
func GenerateToken(secret ed25519.PrivateKey, hash string, claims interface{}, externalData interface{}) (string, error)
func GetClaimsFromJwt ¶ added in v1.0.2
func ValidateToken ¶ added in v1.0.2
Types ¶
type AuthenticatorService ¶
type AuthenticatorService struct {
// contains filtered or unexported fields
}
func (*AuthenticatorService) LogError ¶
func (s *AuthenticatorService) LogError(err error)
func (*AuthenticatorService) ServiceRefreshToken ¶
func (s *AuthenticatorService) ServiceRefreshToken(tokenID string, refreshToken string) (IAccessToken, error)
func (*AuthenticatorService) ServiceSignIn ¶
func (s *AuthenticatorService) ServiceSignIn(username string, password string) (ISignInData, error)
type IAccessToken ¶
type IAccessToken interface {
GetAccessToken() string
}
type IAuthenticator ¶
type IAuthenticator interface { ServiceSignIn(string, string) (ISignInData, error) ServiceRefreshToken(string, string) (IAccessToken, error) LogError(error) }
type IRoleValidatorHandler ¶
type IRoleValidatorHandler interface { RefreshToken() error RoleMiddleware() middleware.Middleware RoleValidatorHandler() }
func NewRoleValidatorHandler ¶
type ISignInData ¶
Click to show internal directories.
Click to hide internal directories.