Documentation ¶
Index ¶
- Constants
- func NewJWTServer(service Service, log *zap.Logger) api.JWTServer
- func NewPBFromNewJWTRequest(msg *NewJWTRequest) *apiJWT.NewJWTRequest
- func NewPBFromNewJWTResponse(msg *NewJWTResponse) *apiJWT.NewJWTResponse
- func NewPBFromRenewJWTRequest(msg *RenewJWTRequest) *apiJWT.RenewJWTRequest
- func NewPBFromRenewJWTResponse(msg *RenewJWTResponse) *apiJWT.RenewJWTResponse
- func NewPBFromRevokeJWTRequest(msg *RevokeJWTRequest) *apiJWT.RevokeJWTRequest
- func NewPBFromRevokeJWTResponse(msg *RevokeJWTResponse) *apiJWT.RevokeJWTResponse
- func Register() *services.ServiceInfo
- type NewJWTRequest
- type NewJWTResponse
- type RenewJWTRequest
- type RenewJWTResponse
- type RevokeJWTRequest
- type RevokeJWTResponse
- type Service
Constants ¶
const ( // StrategyRefreshBoth refresh strategy to issue refresh token on every access token renew StrategyRefreshBoth = "refreshBoth" // StrategyRefreshOnExpire refresh strategy to issue refresh token if it's expiration time is close StrategyRefreshOnExpire = "refreshOnExpire" // StrategyNoRefresh refresh strategy means refresh token issue must be explicit, only by calling NewJWT StrategyNoRefresh = "noRefresh" )
Variables ¶
This section is empty.
Functions ¶
func NewJWTServer ¶
NewJWTServer creates new JWTServer instance
func NewPBFromNewJWTRequest ¶
func NewPBFromNewJWTRequest(msg *NewJWTRequest) *apiJWT.NewJWTRequest
NewPBFromNewJWTRequest transformer *NewJWTRequest to *apiJWT.NewJWTRequest
func NewPBFromNewJWTResponse ¶
func NewPBFromNewJWTResponse(msg *NewJWTResponse) *apiJWT.NewJWTResponse
NewPBFromNewJWTResponse transformer *NewJWTResponse to *apiJWT.NewJWTResponse
func NewPBFromRenewJWTRequest ¶
func NewPBFromRenewJWTRequest(msg *RenewJWTRequest) *apiJWT.RenewJWTRequest
NewPBFromRenewJWTRequest transformer *RenewJWTRequest to *apiJWT.RenewJWTRequest
func NewPBFromRenewJWTResponse ¶
func NewPBFromRenewJWTResponse(msg *RenewJWTResponse) *apiJWT.RenewJWTResponse
NewPBFromRenewJWTResponse transformer *RenewJWTResponse to *apiJWT.RenewJWTResponse
func NewPBFromRevokeJWTRequest ¶
func NewPBFromRevokeJWTRequest(msg *RevokeJWTRequest) *apiJWT.RevokeJWTRequest
NewPBFromRevokeJWTRequest transformer *RevokeJWTRequest to *apiJWT.RevokeJWTRequest
func NewPBFromRevokeJWTResponse ¶
func NewPBFromRevokeJWTResponse(msg *RevokeJWTResponse) *apiJWT.RevokeJWTResponse
NewPBFromRevokeJWTResponse transformer *RevokeJWTResponse to *apiJWT.RevokeJWTResponse
Types ¶
type NewJWTRequest ¶
NewJWTRequest message type
func NewNewJWTRequestFromPB ¶
func NewNewJWTRequestFromPB(msg *apiJWT.NewJWTRequest) *NewJWTRequest
NewNewJWTRequestFromPB transformer *apiJWT.NewJWTRequest to *NewJWTRequest
type NewJWTResponse ¶
type NewJWTResponse struct { ID string AccessToken string RefreshToken string Expiry jwt.NumericDate }
NewJWTResponse message type
func NewNewJWTResponseFromPB ¶
func NewNewJWTResponseFromPB(msg *apiJWT.NewJWTResponse) *NewJWTResponse
NewNewJWTResponseFromPB transformer *apiJWT.NewJWTResponse to *NewJWTResponse
type RenewJWTRequest ¶
RenewJWTRequest message type
func NewRenewJWTRequestFromPB ¶
func NewRenewJWTRequestFromPB(msg *apiJWT.RenewJWTRequest) *RenewJWTRequest
NewRenewJWTRequestFromPB transformer *apiJWT.RenewJWTRequest to *RenewJWTRequest
type RenewJWTResponse ¶
type RenewJWTResponse struct { ID string AccessToken string RefreshToken string Expiry jwt.NumericDate }
RenewJWTResponse message type
func NewRenewJWTResponseFromPB ¶
func NewRenewJWTResponseFromPB(msg *apiJWT.RenewJWTResponse) *RenewJWTResponse
NewRenewJWTResponseFromPB transformer *apiJWT.RenewJWTResponse to *RenewJWTResponse
type RevokeJWTRequest ¶
RevokeJWTRequest message type
func NewRevokeJWTRequestFromPB ¶
func NewRevokeJWTRequestFromPB(msg *apiJWT.RevokeJWTRequest) *RevokeJWTRequest
NewRevokeJWTRequestFromPB transformer *apiJWT.RevokeJWTRequest to *RevokeJWTRequest
type RevokeJWTResponse ¶
type RevokeJWTResponse struct { }
RevokeJWTResponse message type
func NewRevokeJWTResponseFromPB ¶
func NewRevokeJWTResponseFromPB(msg *apiJWT.RevokeJWTResponse) *RevokeJWTResponse
NewRevokeJWTResponseFromPB transformer *apiJWT.RevokeJWTResponse to *RevokeJWTResponse
type Service ¶
type Service interface { NewJWT(ctx context.Context, req *NewJWTRequest) (*NewJWTResponse, error) RenewJWT(ctx context.Context, req *RenewJWTRequest) (*RenewJWTResponse, error) RevokeJWT(ctx context.Context, req *RevokeJWTRequest) (*RevokeJWTResponse, error) }
Service interface type