Class ApiKeyClientAuthenticationConverter

java.lang.Object
com.broadleafcommerce.auth.authorization.security.apikey.ApiKeyClientAuthenticationConverter
All Implemented Interfaces:
org.springframework.security.web.authentication.AuthenticationConverter

public class ApiKeyClientAuthenticationConverter extends Object implements org.springframework.security.web.authentication.AuthenticationConverter
Converts an HTTP request containing an API key into an ApiKeyClientAuthenticationToken for Phase 1 of the OAuth2 flow (Client Authentication).
See Also:
  • Constructor Details

    • ApiKeyClientAuthenticationConverter

      public ApiKeyClientAuthenticationConverter()
  • Method Details

    • convert

      public org.springframework.security.core.Authentication convert(jakarta.servlet.http.HttpServletRequest request)
      Extracts the api_key from the request parameters and returns an unauthenticated ApiKeyClientAuthenticationToken.
      Specified by:
      convert in interface org.springframework.security.web.authentication.AuthenticationConverter
      Parameters:
      request - the HTTP servlet request
      Returns:
      the unauthenticated token, or null if the key is not present or is duplicated