ClientAuth (JASPIC 3.1 API Documentation - Apache Tomcat 11.0.22)
Description: declaration: package: jakarta.security.auth.message, interface: ClientAuth

# Interface ClientAuth

All Known Subinterfaces:
  `ClientAuthContext, ClientAuthModule`

public interface ClientAuth

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default void`
  `cleanSubject(MessageInfo messageInfo, Subject subject)`
  Remove principals and/or credentials from the subject that were previously added by this authentication mechanism.
  `AuthStatus`
  `secureRequest(MessageInfo messageInfo, Subject clientSubject)`
  Secure (authenticate) the request.
  `default AuthStatus`
  `validateResponse(MessageInfo messageInfo, Subject clientSubject, Subject serviceSubject)`
  Validate a response.

- ## Method Details

  - ### secureRequest

    AuthStatus secureRequest(MessageInfo messageInfo, Subject clientSubject) throws AuthException
    Secure (authenticate) the request.
    Parameters:
      `messageInfo` - The associated request and response
      `clientSubject` - The subject that represents the source of the request
    Returns:
      An AuthStatus instance that represents the result of the authentication
    Throws:
      `AuthException` - If a failure occurred in a manner that prevented the failure from being communicated via messageInfo

  - ### validateResponse

    default AuthStatus validateResponse(MessageInfo messageInfo, Subject clientSubject, Subject serviceSubject) throws AuthException
    Validate a response.
    Parameters:
      `messageInfo` - The associated request and response
      `clientSubject` - The subject that represents the recipient of the response
      `serviceSubject` - The subject that represents the source of the response
    Returns:
      An AuthStatus instance that represents the result of the validation
    Throws:
      `AuthException` - If a failure occurred in a manner that prevented the failure from being communicated via messageInfo

  - ### cleanSubject

    default void cleanSubject(MessageInfo messageInfo, Subject subject) throws AuthException
    Remove principals and/or credentials from the subject that were previously added by this authentication mechanism.
    Parameters:
      `messageInfo` - The associated request and response
      `subject` - The subject to clean
    Throws:
      `AuthException` - If a failure occurred