Documentation ¶
Index ¶
- Constants
- type Config
- type Request
- type Response
- type Service
- func (s *Service) Auther(ctx iris.Context)
- func (s *Service) Init(app sptty.ISptty) error
- func (s *Service) Parse(tokenStr string) (jwt.MapClaims, error)
- func (s *Service) Parser(ctx iris.Context)
- func (s *Service) Refresh(tokenStr string) (string, error)
- func (s *Service) ServiceName() string
- func (s *Service) SetSecret(secret string)
- func (s *Service) Sign(claims jwt.MapClaims) (string, error)
- func (s *Service) Signer(ctx iris.Context)
- func (s *Service) Validate(myClaims jwt.MapClaims, tokenStr string) (jwt.MapClaims, error)
Constants ¶
View Source
const (
RequestFailed = "JwtRequestFailed"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { sptty.BaseConfig Expiry time.Duration `yaml:"expiry"` }
func (*Config) ConfigName ¶
type Request ¶
type Request struct { Token string `json:"token"` Claims jwt.MapClaims `json:"claims"` }
type Service ¶
type Service struct { sptty.BaseService // contains filtered or unexported fields }
func (*Service) ServiceName ¶
Click to show internal directories.
Click to hide internal directories.