Documentation
¶
Overview ¶
Package handler implements the TokenEngine gRPC service handlers. All RPC handlers are Unimplemented stubs in v0.1 — real implementations begin in v0.2. It does not own observability wiring or interceptor chain assembly. Primary dependency: gen/v1 for the generated TokenEngineServer interface.
Index ¶
- type TokenHandler
- func (h *TokenHandler) IssueToken(ctx context.Context, req *tokenv1.IssueTokenRequest) (*tokenv1.TokenPair, error)
- func (h *TokenHandler) RefreshToken(ctx context.Context, req *tokenv1.RefreshTokenRequest) (*tokenv1.TokenPair, error)
- func (h *TokenHandler) RevokeAllForAudience(ctx context.Context, req *tokenv1.RevokeAudienceRequest) (*tokenv1.RevokeTokenResponse, error)
- func (h *TokenHandler) RevokeAllUserTokens(ctx context.Context, req *tokenv1.RevokeUserRequest) (*tokenv1.RevokeTokenResponse, error)
- func (h *TokenHandler) RevokeToken(ctx context.Context, req *tokenv1.RevokeTokenRequest) (*tokenv1.RevokeTokenResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenHandler ¶
type TokenHandler struct {
tokenv1.UnimplementedTokenEngineServer
// contains filtered or unexported fields
}
TokenHandler implements the TokenEngine gRPC service.
func NewTokenHandler ¶
func NewTokenHandler( registry registry.TenantRegistry, logger observability.Logger, tracer observability.Tracer, metrics observability.Metrics, ) *TokenHandler
NewTokenHandler returns a new TokenHandler wired with the given dependencies.
func (*TokenHandler) IssueToken ¶
func (h *TokenHandler) IssueToken(ctx context.Context, req *tokenv1.IssueTokenRequest) (*tokenv1.TokenPair, error)
IssueToken issues a new access/refresh token pair for the requesting tenant.
func (*TokenHandler) RefreshToken ¶
func (h *TokenHandler) RefreshToken(ctx context.Context, req *tokenv1.RefreshTokenRequest) (*tokenv1.TokenPair, error)
RefreshToken issues a new access token using a valid refresh token.
func (*TokenHandler) RevokeAllForAudience ¶
func (h *TokenHandler) RevokeAllForAudience(ctx context.Context, req *tokenv1.RevokeAudienceRequest) (*tokenv1.RevokeTokenResponse, error)
RevokeAllForAudience revokes all tokens for an audience. Unimplemented in v0.2.
func (*TokenHandler) RevokeAllUserTokens ¶
func (h *TokenHandler) RevokeAllUserTokens(ctx context.Context, req *tokenv1.RevokeUserRequest) (*tokenv1.RevokeTokenResponse, error)
RevokeAllUserTokens revokes all tokens for a user. Unimplemented in v0.2.
func (*TokenHandler) RevokeToken ¶
func (h *TokenHandler) RevokeToken(ctx context.Context, req *tokenv1.RevokeTokenRequest) (*tokenv1.RevokeTokenResponse, error)
RevokeToken revokes a specific token. Unimplemented in v0.2.