Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claims ¶
type Claims struct { Id int `json:"id"` Role int `json:"role"` GihubId int64 `json:"github_id"` Username string `json:"username"` AccessToken string `json:"-"` AccessTokenCipher string `json:"access_token_cipher,omitempty"` jwt.RegisteredClaims }
func (*Claims) DecryptAccessToken ¶
func (*Claims) EncryptAccessToken ¶
type JwtService ¶
type JwtService struct {
// contains filtered or unexported fields
}
func NewJwtService ¶
func NewJwtService(jwtSecretFunc func() string) *JwtService
func (*JwtService) ParseToken ¶
func (js *JwtService) ParseToken(token string) (*Claims, *jwt.Token, error)
Click to show internal directories.
Click to hide internal directories.