Documentation
¶
Index ¶
Constants ¶
View Source
const (
ContextJWTKey = "user"
)
View Source
const EnvPrefix = "JWT"
Variables ¶
View Source
var ErrJWTTokenNotFound = errors.New("jwt token not found")
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
PrivateKey string `env:"_PRIVATE_KEY,required,expand" envDefault:"${PWD}/testdata/test-jwt.key"`
PublicKey string `env:"_PUBLIC_KEY,required,expand" envDefault:"${PWD}/testdata/test-jwt.pem"`
}
func GetConfigFromEnv ¶
func (Config) GetPrivateKey ¶
func (Config) GetPublicKey ¶
type Payload ¶
type Payload struct {
UserID string `json:"user_id"`
OrgID string `json:"org_id"`
Role model.UserRole `json:"role"`
OrgSlug string `json:"org_slug"`
OrgName string `json:"org_name"`
UserName string `json:"user_name"`
Scopes model.Scopes `json:"scopes"`
ChangePassword bool `json:"change_password"`
}
func DecodeClaims
deprecated
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) GetSigningKey
deprecated
func (j *Service) GetSigningKey() jwtware.SigningKey
GetSigningKey returns a Fiber JWT middleware signing key.
Deprecated: use PublicSigningKey for a core-owned signing key result.
Click to show internal directories.
Click to hide internal directories.