Documentation
¶
Index ¶
- type HS256JWTStrategy
- func (j *HS256JWTStrategy) Decode(ctx context.Context, token string) (*jwt.Token, error)
- func (j *HS256JWTStrategy) Generate(ctx context.Context, claims jwt.Claims, header jwt_.Mapper) (string, string, error)
- func (j *HS256JWTStrategy) GetSignature(ctx context.Context, token string) (string, error)
- func (j *HS256JWTStrategy) GetSigningMethodLength() int
- func (j *HS256JWTStrategy) Hash(ctx context.Context, in []byte) ([]byte, error)
- func (j *HS256JWTStrategy) Validate(ctx context.Context, token string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HS256JWTStrategy ¶
type HS256JWTStrategy struct {
Key []byte
}
HS256JWTStrategy is responsible for generating and validating JWT challenges
func (*HS256JWTStrategy) Decode ¶
func (j *HS256JWTStrategy) Decode(ctx context.Context, token string) (*jwt.Token, error)
Decode will decode a JWT token
func (*HS256JWTStrategy) Generate ¶
func (j *HS256JWTStrategy) Generate(ctx context.Context, claims jwt.Claims, header jwt_.Mapper) (string, string, error)
Generate generates a new authorize code or returns an error. set secret
func (*HS256JWTStrategy) GetSignature ¶
GetSignature will return the signature of a token
func (*HS256JWTStrategy) GetSigningMethodLength ¶
func (j *HS256JWTStrategy) GetSigningMethodLength() int
GetSigningMethodLength will return the length of the signing method
Click to show internal directories.
Click to hide internal directories.