ApiKeyAuthenticationFilter

class ApiKeyAuthenticationFilter(authenticator: ApiKeyAuthenticator, pathPatterns: List<String> = listOf("/api/v1/**"))

Servlet filter that validates API keys on incoming requests.

This filter checks for an API key header and validates it using the configured ApiKeyAuthenticator. Requests without a valid API key receive a 401 Unauthorized response.

For Spring Security integration, add this filter before UsernamePasswordAuthenticationFilter.

Constructors

Link copied to clipboard
constructor(authenticator: ApiKeyAuthenticator, pathPatterns: List<String> = listOf("/api/v1/**"))

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open fun doFilterInternal(request: <Error class: unknown class>, response: <Error class: unknown class>, filterChain: <Error class: unknown class>)