/ GUNRPG.Application / Identity / IPublicKeyProvider.cs
IPublicKeyProvider.cs
 1  namespace GUNRPG.Application.Identity;
 2  
 3  /// <summary>
 4  /// Exposes the node's Ed25519 public key for external consumption.
 5  /// Implemented by <c>JwtTokenService</c> in the Infrastructure layer.
 6  /// Used by <c>GET /auth/token/public-key</c> to support future node-to-node trust exchange.
 7  /// </summary>
 8  public interface IPublicKeyProvider
 9  {
10      /// <summary>Returns the raw Ed25519 public key bytes (32 bytes).</summary>
11      byte[] GetPublicKeyBytes();
12  
13      /// <summary>
14      /// Returns the JWT <c>kid</c> (key ID) — a SHA-256 thumbprint of the public key.
15      /// Validators use this to select the correct key when multiple key versions exist.
16      /// </summary>
17      string GetKeyId();
18  }