Documentation
¶
Index ¶
- Variables
- func NewJwtToken(clock clock.Clock) (itbasisJwtToken.JwtToken, error)
- func NewJwtTokenCustomConfig(clock clock.Clock, config itbasisJwtToken.Config) (itbasisJwtToken.JwtToken, error)
- type JwtTokenImpl
- func (receiver *JwtTokenImpl) CreateAccessToken(ctx context.Context, sessionUser model.SessionUser) (string, *time.Time, error)
- func (receiver *JwtTokenImpl) CreateRefreshToken(ctx context.Context, sessionUser model.SessionUser) (string, *time.Time, error)
- func (receiver *JwtTokenImpl) CreateTokenCustomDuration(ctx context.Context, sessionUser model.SessionUser, ...) (string, *time.Time, error)
- func (receiver *JwtTokenImpl) Parse(ctx context.Context, tokenString string) (*model.SessionUser, error)
- func (receiver *JwtTokenImpl) SetSecretKey(secretKey []byte, signMethod jwt.SigningMethod)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCreatingToken = errors.New("error creating token")
Functions ¶
func NewJwtToken ¶
func NewJwtToken(clock clock.Clock) (itbasisJwtToken.JwtToken, error)
func NewJwtTokenCustomConfig ¶
func NewJwtTokenCustomConfig(clock clock.Clock, config itbasisJwtToken.Config) (itbasisJwtToken.JwtToken, error)
Types ¶
type JwtTokenImpl ¶
type JwtTokenImpl struct {
itbasisJwtToken.JwtToken
// contains filtered or unexported fields
}
func (*JwtTokenImpl) CreateAccessToken ¶
func (receiver *JwtTokenImpl) CreateAccessToken(ctx context.Context, sessionUser model.SessionUser) (string, *time.Time, error)
func (*JwtTokenImpl) CreateRefreshToken ¶ added in v0.0.7
func (receiver *JwtTokenImpl) CreateRefreshToken(ctx context.Context, sessionUser model.SessionUser) (string, *time.Time, error)
func (*JwtTokenImpl) CreateTokenCustomDuration ¶ added in v0.0.7
func (*JwtTokenImpl) Parse ¶
func (receiver *JwtTokenImpl) Parse(ctx context.Context, tokenString string) (*model.SessionUser, error)
func (*JwtTokenImpl) SetSecretKey ¶
func (receiver *JwtTokenImpl) SetSecretKey(secretKey []byte, signMethod jwt.SigningMethod)
Click to show internal directories.
Click to hide internal directories.