Class TotpKeyProvider
- Namespace
- FishMMO.ControlPanel.Services
- Assembly
- FishMMO-ControlPanel.dll
Holds the deployment-shared TOTP master KEK, loaded once at startup from
deployment_secrets.
public sealed class TotpKeyProvider
- Inheritance
-
TotpKeyProvider
- Inherited Members
Remarks
This is the same key the LoginServer loads, under the same row key, which is the whole point: an authenticator enrolled in the game client must verify on the web and the other way round. Before this key became a deployment secret it was derived per-LoginServer from a randomly regenerated signing key, so nothing outside the enrolling process could ever verify a code — see TotpMasterKek.
Properties
IsAvailable
Whether a usable key is loaded.
public bool IsAvailable { get; }
Property Value
LoadError
Why the key is unavailable, when it is.
public string LoadError { get; }
Property Value
MasterKek
The 32-byte master KEK, or null when it could not be loaded.
public byte[] MasterKek { get; }
Property Value
- byte[]
Methods
LoadAsync(IDeploymentSecretService, CancellationToken)
Loads the key from the database. Called once, before the host starts serving.
public Task<bool> LoadAsync(IDeploymentSecretService secrets, CancellationToken cancellationToken = default)
Parameters
secretsIDeploymentSecretServicecancellationTokenCancellationToken