Interface IApiKeyRegistry
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
tokenNamestring
Returns
GenerateKey()
Generates a random, cryptographic API key
string GenerateKey()
  Returns
Register(KeyToken, string)
Registers the key for a given token
KeyToken Register(KeyToken token, string key)
  Parameters
Returns
- KeyToken
 The registered key token
RegisteredKeyCount()
Returns the total number of registered keys
int RegisteredKeyCount()
  Returns
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
keystring
Returns
- KeyToken
 The
associated with the keyif the key is valid, null otherwise