Class PKCEHelper


  • public class PKCEHelper
    extends Object
    • Constructor Detail

      • PKCEHelper

        public PKCEHelper()
    • Method Detail

      • generatePkceCodes

        public static String[] generatePkceCodes()
        Generates a code verifier and its corresponding code challenge for the PKCE (Proof Key for Code Exchange) flow. PKCE is used to enhance the security of the OAuth 2.0 authorization code flow by preventing authorization code interception attacks. The code verifier is a high-entropy string that is used to generate a code challenge. The code challenge is sent during the authorization request, and the code verifier is sent during the token exchange to validate the request.
        Returns:
        A string array containing the code verifier at index 0 and the corresponding code challenge at index 1.