Documentation
¶
Index ¶
- Constants
- type Config
- type Jwt
- func (j *Jwt) Expire(ctx context.Context, t string) (string, error)
- func (j *Jwt) GetClaims(ctx context.Context, t string) (*UserClaim, error)
- func (j *Jwt) Parse(ctx context.Context, t string, options ...jwt.ParserOption) (*jwt.Token, error)
- func (j *Jwt) Refresh(ctx context.Context, t string, d time.Duration, nd *jwt.NumericDate) (string, error)
- func (j *Jwt) Sign(p *UserClaim) (string, error)
- func (j *Jwt) SignWithJWtClaims(p jwt.Claims) (string, error)
- func (j *Jwt) Verify(ctx context.Context, t string) (bool, error)
- func (j *Jwt) VerifyAndParse(ctx context.Context, t string) (*UserClaim, error)
- type JwtConfig
- type Service
- func (t *Service) GenerateAccessToken(ctx context.Context, u User) (string, error)
- func (t *Service) GenerateRefreshToken(ctx context.Context, u User) (string, error)
- func (t *Service) Parse(ctx context.Context, token string) (*UserClaim, error)
- func (t *Service) Verify(ctx context.Context, token string) (bool, error)
- func (t *Service) VerifyAndParse(ctx context.Context, token string) (*UserClaim, error)
- type User
- type UserClaim
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Jwt ¶
type Jwt struct {
// contains filtered or unexported fields
}
func (*Jwt) SignWithJWtClaims ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) GenerateAccessToken ¶
func (*Service) GenerateRefreshToken ¶
Click to show internal directories.
Click to hide internal directories.