createApiKey

context(_: Raise<Issue>, auth: AuthType.ApiKey, principal: Principal)
fun createApiKey(request: ApiKeyRequestModel): ApiKeyCreatedModel

Creates a new API key owned by the currently authenticated principal. The raw key is only ever available in the returned ApiKeyCreatedModel; only its salted hash is persisted.