KeyManager

A global key manage for operations with API Keys

Types

Link copied to clipboard

Result of key validation

Functions

Link copied to clipboard
fun generateRandomKey(belongs: UUID, permissions: List<APIPermission>): String

Generates a random key with metadata in it

Link copied to clipboard
fun load()

Reads this key manager data from MongoDB

Link copied to clipboard
fun store()

Stores key data in MongoDB

Link copied to clipboard
fun ApplicationCall.validateKey(requiredPermission: APIPermission): KeyManager.ValidationResult

Validates key provided in the call request either in the API-Key header or in the query parameters

Properties

Link copied to clipboard

Amount of requests per-key