Documentation ¶
Overview ¶
Package tokenapi provides an HTTP API for managing JWT tokens.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
func NewService(options ...ConfigOption) auth.TokenAPI
NewService returns a new implementation of auth.TokenAPI
func SetupHTTPHandler ¶
func SetupHTTPHandler(svc auth.TokenAPI, router *mux.Router, tokenSvc auth.TokenService, logger log.Logger, lmt httpapi.LimiterFactory)
SetupHTTPHandler converts a service's public methods to http handlers.
Types ¶
type ConfigOption ¶
type ConfigOption func(*service)
ConfigOption configures the service.
func WithLogger ¶
func WithLogger(l log.Logger) ConfigOption
WithLogger configures the service with a logger.
func WithRepoManager ¶
func WithRepoManager(repoMngr auth.RepositoryManager) ConfigOption
WithRepoManager configures the service with a new RepositoryManager.
func WithTokenService ¶
func WithTokenService(t auth.TokenService) ConfigOption
WithTokenService configures the service with a TokenService.
Click to show internal directories.
Click to hide internal directories.