Interface IApiKeyLifecycleHandler
Opt-in hook that receives an API key's private token at the moment it exists — on create and on
recycle/regenerate — plus a tokenless signal on delete. Register one or more implementations with
AddThargaApiKeyLifecycleHandler<T>(); they are invoked after the corresponding
operation succeeds.
The token is handed only to in-process code the host explicitly registered. If the handler throws, the originating operation (create/recycle/delete) throws too — capture failures are not swallowed.
public interface IApiKeyLifecycleHandler
Methods
OnApiKeyLifecycleAsync(ApiKeyLifecycleContext)
Invoked after an API key is created, recycled, or deleted. See ApiKeyLifecycleContext for what is available per ApiKeyLifecycleReason.
Task OnApiKeyLifecycleAsync(ApiKeyLifecycleContext context)
Parameters
contextApiKeyLifecycleContext