Class OAuthIssuerSigningKey

java.lang.Object
com.revetsec.oauth.server.OAuthIssuerSigningKey

@Immutable public final class OAuthIssuerSigningKey extends Object
One application-owned RS256 signing key. Construction checks the public RSA structure without signing or encoding private material. Pair agreement is checked during bounded signing or explicit engine warm-up. The application must keep provider-backed private handles usable during in-flight operations and keep identifiers permanently bound to their public material across nodes and restarts.
Since:
1.0.0
Author:
Mark Allen
  • Method Details

    • fromRsaKeyPair

      @CheckReturnValue public static @NonNull OAuthIssuerSigningKey fromRsaKeyPair(@NonNull String keyId, @NonNull PrivateKey privateKey, @NonNull PublicKey publicKey)
      Checks one RS256 key pair structurally, without testing or encoding the private key.
      Parameters:
      keyId - nonempty identifier, at most 256 characters
      privateKey - application-owned RSA private key or provider handle
      publicKey - inspectable RSA public key, 2048–16384 bits under the existing exponent and ROCA policy
      Returns:
      an immutable redacted holder
      Throws:
      NullPointerException - if a required argument is null
      IllegalArgumentException - if supplied structure is invalid
      Since:
      1.0.0
    • getKeyId

      Returns the exact key identifier.
      Returns:
      the exact public identifier
      Since:
      1.0.0
    • getPublicKey

      Returns the checked public verification projection.
      Returns:
      the immutable checked public projection, without private material
      Since:
      1.0.0
    • toString

      Overrides:
      toString in class Object
      Returns:
      a description without identifiers or key material
      Since:
      1.0.0