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.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe context that's passed tobuildSaslSubject(Context). -
Method Summary
Modifier and TypeMethodDescriptionReturns an asynchronous result which completes with theSubjectbuilt from the givencontext.
-
Method Details
-
buildSaslSubject
Returns an asynchronous result which completes with theSubjectbuilt from the givencontext.- Parameters:
context- The context of a successful SASL authentication.- Returns:
- The Subject. The returned stage should fail with an
SubjectBuildingExceptionif the builder was not able to build a subject.
-