Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoginCheck ¶
type LoginCheck struct {
HmacSecret []byte
}
func SetupLoginCheck ¶
func SetupLoginCheck() *LoginCheck
func (*LoginCheck) CreateToken ¶
func (m *LoginCheck) CreateToken(claims LoginClaimsPayload) (string, error)
CreateToken create one token
func (*LoginCheck) VerifyToken ¶
func (m *LoginCheck) VerifyToken(tokenString string) (*gojwt.Token, error)
VerifyToken verify token is valid
type LoginClaims ¶
type LoginClaims struct { *gojwt.StandardClaims LoginClaimsPayload }
LoginClaims clasims for Login
type LoginClaimsPayload ¶
LoginClaims clasims payload for Login
Click to show internal directories.
Click to hide internal directories.