Table of Contents

Interface IApiKeyRegistry

Namespace
Tlabs.Identity
Assembly
Tlabs.SrvBase.dll

Registry for managing API Keys

public interface IApiKeyRegistry
Extension Methods

Methods

Deregister(string)

Deregisters the key with the specified tokenName

KeyToken? Deregister(string tokenName)

Parameters

tokenName string

Returns

KeyToken

GenerateKey()

Generates a random, cryptographic API key

string GenerateKey()

Returns

string

Register(KeyToken, string)

Registers the key for a given token

KeyToken Register(KeyToken token, string key)

Parameters

token KeyToken
key string

Returns

KeyToken

The registered key token

RegisteredKeyCount()

Returns the total number of registered keys

int RegisteredKeyCount()

Returns

int

RegisteredKeys()

Returns an array of all currently registered key tokens, including keys that are expired but not deleted

KeyToken[] RegisteredKeys()

Returns

KeyToken[]

VerifiedKey(string)

Key verification routine

KeyToken? VerifiedKey(string key)

Parameters

key string

Returns

KeyToken

The associated with the key if the key is valid, null otherwise