Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthInterface ¶
type AuthInterface interface { GetToken(AuthTokenClaims) (string, error) VerifyToken(tokenString string) (AuthTokenClaims, error) NewAuthTokenClaims(userID uint32, userName string, tokenValiditySeconds uint32) AuthTokenClaims }
type AuthJWT ¶
type AuthJWT struct {
// contains filtered or unexported fields
}
func NewAuthJWT ¶
func (*AuthJWT) NewAuthTokenClaims ¶
func (a *AuthJWT) NewAuthTokenClaims(userID uint32, userName string, requestedTokenValiditySeconds uint32) AuthTokenClaims
func (*AuthJWT) VerifyToken ¶
func (a *AuthJWT) VerifyToken(tokenString string) (AuthTokenClaims, error)
type AuthTokenClaims ¶
type AuthTokenClaims struct { ID uint32 `json:"id"` Username string `json:"username"` jwt.StandardClaims }
Click to show internal directories.
Click to hide internal directories.