Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator struct {
// contains filtered or unexported fields
}
Authenticator will generate and validate token from client
func NewAuthenticator ¶
func NewAuthenticator() *Authenticator
NewAuthenticator function will create an Authenticator
func (*Authenticator) GenerateToken ¶
func (auth *Authenticator) GenerateToken(url string, username string, password string) (string, error)
GenerateToken function will generate standard JWT
func (*Authenticator) SetExpiredTime ¶
func (auth *Authenticator) SetExpiredTime(expiredTime int64) *Authenticator
SetExpiredTime will rewrite expired time into authenticator
func (*Authenticator) VerifyToken ¶
func (auth *Authenticator) VerifyToken(authorization string) error
VerifyToken function will valadiate token
Click to show internal directories.
Click to hide internal directories.