Class ApiKeyAuthenticationConverter

java.lang.Object
org.springaicommunity.mcp.security.server.apikey.web.ApiKeyAuthenticationConverter
All Implemented Interfaces:
org.springframework.security.web.authentication.AuthenticationConverter

public class ApiKeyAuthenticationConverter extends Object implements org.springframework.security.web.authentication.AuthenticationConverter
An AuthenticationConverter which extracts the API key from a HttpServletRequest, and returns a ApiKeyAuthenticationToken.
  • Field Details

  • Constructor Details

    • ApiKeyAuthenticationConverter

      public ApiKeyAuthenticationConverter()
    • ApiKeyAuthenticationConverter

      public ApiKeyAuthenticationConverter(String apiKeyHeaderName)
  • Method Details

    • convert

      public @Nullable org.springframework.security.core.Authentication convert(jakarta.servlet.http.HttpServletRequest request)
      Specified by:
      convert in interface org.springframework.security.web.authentication.AuthenticationConverter