Documentation
¶
Overview ¶
Package apitokenhttp adapts API token HTTP requests to the token usecase.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler adapts API token HTTP requests to the token usecase.
func New ¶
func New(uc *usecase.Usecase, operation OperationRecorder) *Handler
New creates an API token HTTP handler.
func (*Handler) CreateToken ¶
CreateToken creates an API token and returns the raw secret once.
func (*Handler) DeleteToken ¶
DeleteToken revokes an API token.
func (*Handler) ListTokens ¶
ListTokens returns token metadata without raw secrets or hashes.
type OperationRecorder ¶
type OperationRecorder interface {
RecordOperation(context.Context, auditusecase.OperationInput) (auditusecase.OperationLog, error)
}
OperationRecorder records API token mutations for audit.
Click to show internal directories.
Click to hide internal directories.