Interface AsyncServerAuthContext
-
- All Known Implementing Classes:
FallbackAuthContext
public interface AsyncServerAuthContextAn 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
MessageContextso that it can be retrieved later for the in thesecureResponse(MessageContext, javax.security.auth.Subject)method.- Since:
- 2.0.0
- See Also:
ServerAuthContext,MessageContext,Subject
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.StringtoString()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.
-
-
-
Method Detail
-
validateRequest
Promise<javax.security.auth.message.AuthStatus,AuthenticationException> validateRequest(MessageContext context, Subject clientSubject, Subject serviceSubject)
Validates the incoming request message.- Parameters:
context- The message context for this request.clientSubject- ASubjectthat represents the subject of this request.serviceSubject- ASubjectthat represents the subject for the server ornull. It may be used to secure the message response.- Returns:
A
Promisethat will be completed, as some point in the future, with either a successful value or a failure value.A successfully completed
Promisewill contain anAuthStatusrepresenting the completion status of the message processing. SeeServerAuth.validateRequest( javax.security.auth.message.MessageInfo, Subject, Subject)for the allowedAuthStatusvalues.A failed completed
Promisewill contain anAuthenticationExceptionwhen the message processing failed without establishing a failure response message in theMessageContext.- See Also:
AuthStatus,ServerAuth.validateRequest( javax.security.auth.message.MessageInfo, Subject, Subject)
-
secureResponse
Promise<javax.security.auth.message.AuthStatus,AuthenticationException> secureResponse(MessageContext context, Subject serviceSubject)
Secures the outgoing response message.- Parameters:
context- The message context for this request.serviceSubject- ASubjectthat represents the subject for the server ornull. It may be used to secure the message response.- Returns:
A
Promisethat will be completed, as some point in the future, with either a successful value or a failure value.A successfully completed
Promisewill contain anAuthStatusrepresenting the completion status of the processing. SeeServerAuth.secureResponse( javax.security.auth.message.MessageInfo, Subject)for the allowedAuthStatusvalues. NoteAuthStatus.SEND_CONTINUEis not supported by this interfaceA failed completed
Promisewill contain anAuthenticationExceptionwhen the message processing failed without establishing a failure response message in theMessageContext.- See Also:
AuthStatus,ServerAuth.secureResponse( javax.security.auth.message.MessageInfo, Subject)
-
cleanSubject
Promise<Void,AuthenticationException> cleanSubject(MessageContext context, Subject clientSubject)
Removes any method specific principals and credentials from the client subject.- Parameters:
context- The message context for this request.clientSubject- ASubjectthat represents the subject of this request.- Returns:
- A
Promisethat will be completed, as some point in the future, with either a successful value or a failure value. A successfully completedPromisewill contain no value and a failed completedPromisewill contain anAuthenticationExceptionif an error occurs during theSubjectprocessing. - See Also:
ServerAuth.cleanSubject( javax.security.auth.message.MessageInfo, Subject)
-
-