public interface AsyncServerAuthContext
An asynchronous interface counterpart for the
ServerAuthContext. Responsible for passing request
and response messages to its configured modules based on the logic this authentication context
defines.
Module instance MUST be constructed and initialized before being passed to the authentication context instance.
Implementations of this interface must be thread-safe as instances may be used concurrently
by multiple requests. If the authentication context needs to store any state for a single
request it should store the state in the MessageContext so that it can be retrieved
later for the in the secureResponse(MessageContext, javax.security.auth.Subject)
method.
ServerAuthContext,
MessageContext,
Subject| Modifier and Type | Method and Description |
|---|---|
Promise<Void,AuthenticationException> |
cleanSubject(MessageContext context,
Subject clientSubject)
Removes any method specific principals and credentials from the client subject.
|
Promise<javax.security.auth.message.AuthStatus,AuthenticationException> |
secureResponse(MessageContext context,
Subject serviceSubject)
Secures the outgoing response message.
|
String |
toString()
A short but useful description of this authentication context.
|
Promise<javax.security.auth.message.AuthStatus,AuthenticationException> |
validateRequest(MessageContext context,
Subject clientSubject,
Subject serviceSubject)
Validates the incoming request message.
|
Promise<javax.security.auth.message.AuthStatus,AuthenticationException> validateRequest(MessageContext context, Subject clientSubject, Subject serviceSubject)
context - The message context for this request.clientSubject - A Subject that represents the subject of this request.serviceSubject - A Subject that represents the subject for the server or
null. It may be used to secure the message response.A Promise that will be completed, as some point in the future, with
either a successful value or a failure value.
A successfully completed Promise will contain an AuthStatus representing
the completion status of the message processing. See
ServerAuth.validateRequest(
javax.security.auth.message.MessageInfo, Subject, Subject) for the allowed
AuthStatus values.
A failed completed Promise will contain an AuthenticationException when
the message processing failed without establishing a failure response message in the
MessageContext.
AuthStatus,
ServerAuth.validateRequest(
javax.security.auth.message.MessageInfo, Subject, Subject)Promise<javax.security.auth.message.AuthStatus,AuthenticationException> secureResponse(MessageContext context, Subject serviceSubject)
context - The message context for this request.serviceSubject - A Subject that represents the subject for the server or
null. It may be used to secure the message response.A Promise that will be completed, as some point in the future, with
either a successful value or a failure value.
A successfully completed Promise will contain an AuthStatus representing
the completion status of the processing. See
ServerAuth.secureResponse(
javax.security.auth.message.MessageInfo, Subject) for the allowed
AuthStatus values. Note AuthStatus.SEND_CONTINUE is not supported by this
interface
A failed completed Promise will contain an AuthenticationException when
the message processing failed without establishing a failure response message in the
MessageContext.
AuthStatus,
ServerAuth.secureResponse(
javax.security.auth.message.MessageInfo, Subject)Promise<Void,AuthenticationException> cleanSubject(MessageContext context, Subject clientSubject)
context - The message context for this request.clientSubject - A Subject that represents the subject of this request.Promise that will be completed, as some point in the future, with
either a successful value or a failure value. A successfully completed Promise will
contain no value and a failed completed Promise will contain an
AuthenticationException if an error occurs during the Subject processing.ServerAuth.cleanSubject(
javax.security.auth.message.MessageInfo, Subject)Copyright © 2025 Open Identity Platform Community. All rights reserved.