0

I have successfully managed to authorize a user and obtain an authorization code, which is shown in the URL along with a state.

The problem is, I'm not sure what the next step would be in the flow here. This is where I have the redirect-uri set to: http://localhost:8080/login/oauth2/code/{registrationId} where it will append the authorization code and state, but it just takes me back to the login screen with this error:

Your login attempt was not successful, try again.

Reason: An error occurred while sending the Access Token Request: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I've basically been trying to follow the code on https://github.com/pivotal-cf/identity-sample-apps/tree/spring-boot-2.1/authcode.

I am using Spring Boot 2.0.3. Any help that can be provided would be greatly appreciated.

nircraft
  • 8,242
  • 5
  • 30
  • 46
smert
  • 23
  • 4
  • Generally that error comes from not being able to find the certificate that will be used to sign a token. So is your server creating a JWT that will be returned? – ChocolateAndCheese Apr 22 '19 at 20:45
  • Have you seen this yet: https://stackoverflow.com/questions/9619030/resolving-javax-net-ssl-sslhandshakeexception-sun-security-validator-validatore?rq=1 – ChocolateAndCheese Apr 22 '19 at 20:46

0 Answers0