Class IdentityKeyVerifier

java.lang.Object
org.cloudburstmc.netty.util.nethernet.IdentityKeyVerifier
All Implemented Interfaces:
AutoCloseable

public abstract class IdentityKeyVerifier extends Object implements AutoCloseable
One login decision, owned by a transport channel. Never exposes admission secrets.
  • Constructor Details

    • IdentityKeyVerifier

      public IdentityKeyVerifier()
  • Method Details

    • mismatch

      public final String mismatch(PublicKey key)
      Spends the binding on one login, whatever the outcome.
      Parameters:
      key - The key the login chain is signed with
      Returns:
      Why the login must be rejected, or null when it may proceed
    • acceptForwardedIdentity

      public final String acceptForwardedIdentity()
      Spends the binding without a key of its own, for an application's already authenticated and explicitly trusted forwarding path.
      Returns:
      Why the login must be rejected, or null when it may proceed
    • pending

      public final boolean pending()
      Returns:
      Whether a login may still be decided against this binding
    • rejected

      public final boolean rejected()
      Returns:
      Whether nothing can be admitted against this binding any more
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
    • usable

      protected boolean usable()
      Returns:
      Whether the admission behind this binding is still live
    • matches

      protected abstract boolean matches(byte[] canonicalKey)
      Parameters:
      canonicalKey - The login key, canonicalised by IdentityPublicKey
      Returns:
      Whether it is the key the transport admitted
    • release

      protected abstract void release()
      Erases whatever the binding held. Called once, whichever way it is spent.