Class SimpleServerAuthContext

  • All Implemented Interfaces:
    ServerAuthContext, ServerAuth

    public class SimpleServerAuthContext
    extends Object
    implements ServerAuthContext
    Basic implementation primarily intended for use when using third-party ServerAuthModule implementations that only provide the module. This implementation supports multiple modules and will treat the user as authenticated if any one module is able to authenticate the user.
    • Constructor Detail

    • Method Detail

      • validateRequest

        public AuthStatus validateRequest​(MessageInfo messageInfo,
                                          Subject clientSubject,
                                          Subject serviceSubject)
                                   throws AuthException
        Description copied from interface: jakarta.security.auth.message.ServerAuth
        Validate the request.
        Specified by:
        validateRequest in interface ServerAuth
        Parameters:
        messageInfo - The associated request and response
        clientSubject - The subject that represents the source of the request
        serviceSubject - The subject that represents the recipient of the request
        Returns:
        An AuthStatus instance that represents the result of the validation
        Throws:
        AuthException - If the a failure occurred in a manner that prevented the failure from being communicated via messageInfo
      • secureResponse

        public AuthStatus secureResponse​(MessageInfo messageInfo,
                                         Subject serviceSubject)
                                  throws AuthException
        Description copied from interface: jakarta.security.auth.message.ServerAuth
        Secure (authenticate) the response.
        Specified by:
        secureResponse in interface ServerAuth
        Parameters:
        messageInfo - The associated request and response
        serviceSubject - The subject that represents the source of the response
        Returns:
        An AuthStatus instance that represents the result of the authentication
        Throws:
        AuthException - If the a failure occurred in a manner that prevented the failure from being communicated via messageInfo