0

After receiving the Access Token, I attach that in my Postman and test my sample REST API (developed in Spring Boot) running in localhost

I get the below error message while doing so

{
    "error": "server_error",
    "error_description": "Invalid JWK Set Object. The JWK Set MUST have a keys attribute."
}

This is my API

@RestController
@RequestMapping("/security/demo")
@EnableResourceServer
public class MyController {

    @GetMapping
    public String sayHello () {
        return "Hello Friend" ;
    }
}

This is my Property file

# Security
security.oauth2.resource.id=783f0982-2134-4f98-8a15-c520a6737bbe
security.oauth2.resource.jwk.key-set-uri=https://*******.com/token_key
security.basic.enabled=false
Arun
  • 3,440
  • 11
  • 60
  • 108

1 Answers1

0

I found the error. It was a big mistake from my end. I had to set this property to get rid of the error

security.oauth2.resource.jwt.key-uri
Arun
  • 3,440
  • 11
  • 60
  • 108