Interface PkiServerAuthenticator

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
AdministrativeAuthenticator, MutualTlsAuthenticator
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface PkiServerAuthenticator extends AutoCloseable
Internal transport-neutral server authentication composition boundary. This unexported interface is not a public ServiceLoader extension contract.

Implementations resolve one per-request principal identity from a TLS peer without inspecting operation arguments or request bodies. The result is a closed, safe value that the authorization engine can act on without further I/O.

Thread safety

Implementations must be thread-safe; the server calls authenticate(PkiServerAuthenticationContext) from multiple threads concurrently for independent requests.

Since:
1.0
  • Method Details

    • authenticate

      Authenticates one already TLS-validated peer without inspecting operation arguments.
      Parameters:
      context - bounded trusted TLS context; never null
      Returns:
      safe authentication result; never null
      Throws:
      NullPointerException - if context is null
    • close

      default void close() throws IOException
      Releases optional provider resources.

      The default implementation owns no closeable resources. Stateful implementations may override this; repeated close calls should be harmless. Checked resource failures must retain their original cause when translated to I/O failures, and interrupted closure must restore interruption.

      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException - if a provider resource cannot be released