Interface SaslSubjectBuilder


public interface SaslSubjectBuilder

Builds a Subject based on information available from a successful SASL authentication.

A SaslSubjectBuilder instance is constructed by a SaslSubjectBuilderService.

A SASL-authenticating Filter may use a SaslSubjectBuilder in order to construct the Subject with which it calls FilterContext.clientSaslAuthenticationSuccess(String, Subject). As such, SaslSubjectBuilder is an opt-in way of decoupling the building of Subjects from the mechanism of SASL authentication. SASL-authenticating filters are not obliged to use this abstraction.

TransportSubjectBuilder is a similar interface use for building a Subject based on transport-layer information. However, note that a SaslSubjectBuilder is not specified directly on a virtual cluster as a TransportSubjectBuilder is.

  • Method Details

    • buildSaslSubject

      Returns an asynchronous result which completes with the Subject built from the given context.
      Parameters:
      context - The context of a successful SASL authentication.
      Returns:
      The Subject. The returned stage should fail with an SubjectBuildingException if the builder was not able to build a subject.