Documentation ¶
Index ¶
- func FromContext(ctx context.Context) *types.User
- func IsAdminContext(ctx context.Context) bool
- func NewAdminContext(ctx context.Context) context.Context
- func NewContext(ctx context.Context, user *types.User) context.Context
- func RequireAuthMiddleware(inner http.Handler) http.Handler
- func UserInfoMiddleware(verifier jwt.Verifier) func(http.Handler) http.Handler
- type Handler
- type Service
- type UserAuthen
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAdminContext ¶
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(srv service) *Handler
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(signer jwt.Signer, authenticator UserAuthen) *Service
Click to show internal directories.
Click to hide internal directories.