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

# Interface ServerAuthModule

All Superinterfaces:
  `ServerAuth`

public interface ServerAuthModule extends ServerAuth
Provides server-side authentication of requests and response signing.

This interface extends `ServerAuth` and is implemented by authentication module providers. It is initialized by the container and provides the actual authentication logic for server-side message authentication.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Class<?>[]`
  `getSupportedMessageTypes()`
  Returns the array of message types supported by the module.
  `void`
  `initialize(MessagePolicy requestPolicy, MessagePolicy responsePolicy, CallbackHandler handler, Map<String,Object> options)`
  Initialize the authentication module.

  ### Methods inherited from interface ServerAuth

  `cleanSubject, secureResponse, validateRequest`

- ## Method Details

  - ### initialize

    void initialize(MessagePolicy requestPolicy, MessagePolicy responsePolicy, CallbackHandler handler, Map<String,Object> options) throws AuthException
    Initialize the authentication module.

    This method is called by the container to initialize the module with the request and response policies, a callback handler, and a set of options.

    Parameters:
      `requestPolicy` - The policy for the request message
      `responsePolicy` - The policy for the response message
      `handler` - The callback handler used to obtain credentials
      `options` - The options provided to the module
    Throws:
      `AuthException` - If an error occurs during initialization

  - ### getSupportedMessageTypes

    Class<?>[] getSupportedMessageTypes()
    Returns the array of message types supported by the module.
    Returns:
      The array of supported message type classes