Auth0-PHP

PKCE
in package

Class PKCE.

Table of Contents

generateCodeChallenge()  : string
Returns the generated code challenge from the given code_verifier. The code_challenge should be a Base64 encoded string with URL and filename-safe characters. The trailing '=' characters should be removed and no line breaks, whitespace, or other additional characters should be present.
generateCodeVerifier()  : string
Generate a random string of between 43 and 128 characters containing letters, numbers and "-", ".", "_", "~", as defined in the RFC 7636 specification.

Methods

generateCodeChallenge()

Returns the generated code challenge from the given code_verifier. The code_challenge should be a Base64 encoded string with URL and filename-safe characters. The trailing '=' characters should be removed and no line breaks, whitespace, or other additional characters should be present.

public static generateCodeChallenge(string $codeVerifier) : string
Parameters
$codeVerifier : string

string to generate code challenge from

Tags
see
https://auth0.com/docs/flows/concepts/auth-code-pkce
Return values
string

generateCodeVerifier()

Generate a random string of between 43 and 128 characters containing letters, numbers and "-", ".", "_", "~", as defined in the RFC 7636 specification.

public static generateCodeVerifier([int $length = 43 ]) : string
Parameters
$length : int = 43

Code verifier length

Tags
see
https://tools.ietf.org/html/rfc7636
Return values
string

Search results