Class NuggetAuthenticationRequest

java.lang.Object
org.j7m.middleware.operations.api.NuggetAuthenticationRequest

public final class NuggetAuthenticationRequest extends Object
UI-neutral metadata for one nugget PIN admission request.

The reusable credential is deliberately not stored in this public request object. Runtime admission services accept the credential as a separate shortest-scope argument so request diagnostics, toString(), audit, and JSON-style representations cannot expose it. Correlation and source identifiers are normalized by the constructor before throttle bucketing or audit use so hostile pre-authentication text cannot expand retained state or leak secrets.

  • Method Details

    • from

      Creates request metadata with a generated correlation id.
      Parameters:
      source - source class
      Returns:
      request metadata
    • of

      public static NuggetAuthenticationRequest of(String correlationId, NuggetAuthenticationSource source, String sourceId, boolean trustedSource, Instant requestedAt)
      Creates request metadata.
      Parameters:
      correlationId - caller-supplied audit correlation id; blank, overlong, malformed, or sensitive values are replaced
      source - source class
      sourceId - bounded endpoint or listener identifier; unsafe values are omitted
      trustedSource - whether the runtime owns and trusts sourceId
      requestedAt - request creation timestamp for diagnostics
      Returns:
      request metadata
    • correlationId

      public String correlationId()
      Returns the audit correlation id.
      Returns:
      correlation id
    • source

      public NuggetAuthenticationSource source()
      Returns the coarse source class.
      Returns:
      source class
    • sourceId

      public String sourceId()
      Returns a bounded endpoint or listener identifier when it is safe.
      Returns:
      source identifier, or empty string
    • trustedSource

      public boolean trustedSource()
      Returns whether sourceId() is owned and trusted by the runtime.
      Returns:
      trusted-source flag
    • requestedAt

      public Instant requestedAt()
      Returns the request timestamp.
      Returns:
      request timestamp
    • toString

      public String toString()
      Overrides:
      toString in class Object