Skip to content

The code challenge isn't being validated #7

@celiovasconcelos

Description

@celiovasconcelos

Instead of removing PCKE check, you should do this:

    String grantTypeStr = (String) ((OAuth2ClientAuthenticationToken) authentication).getAdditionalParameters().get("grant_type");
    boolean isGrantTypeAuthorizationCode = AuthorizationGrantType.AUTHORIZATION_CODE.getValue().equals(grantTypeStr);

    if (isGrantTypeAuthorizationCode) {
      // Validate the "code_verifier" parameter for the public client
      this.codeVerifierAuthenticator.authenticateRequired(clientAuthentication, registeredClient);
    }

CodeVerifierAuthenticator is protected, so you must copy it to your project and use the copy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions