Class JwtResourceValidator

java.lang.Object
org.springaicommunity.mcp.security.server.oauth2.jwt.JwtResourceValidator
All Implemented Interfaces:
org.springframework.security.oauth2.core.OAuth2TokenValidator<org.springframework.security.oauth2.jwt.Jwt>

public class JwtResourceValidator extends Object implements org.springframework.security.oauth2.core.OAuth2TokenValidator<org.springframework.security.oauth2.jwt.Jwt>
Validate the "aud" claim of a JWT, ensuring it matches the resource identifier of this MCP server.
Author:
Daniel Garnier-Moiroux
  • Constructor Details

    • JwtResourceValidator

      public JwtResourceValidator(ResourceIdentifier resourceIdentifier)
  • Method Details

    • validate

      public org.springframework.security.oauth2.core.OAuth2TokenValidatorResult validate(org.springframework.security.oauth2.jwt.Jwt token)
      Specified by:
      validate in interface org.springframework.security.oauth2.core.OAuth2TokenValidator<org.springframework.security.oauth2.jwt.Jwt>