Class PkceChallenge
java.lang.Object
com.codename1.io.oidc.PkceChallenge
One PKCE pair (RFC 7636). The code_verifier is kept by the client; the
code_challenge (always S256 here) is sent to the authorization endpoint;
the verifier is then presented to the token endpoint to prove possession.
PKCE is mandatory on every authorization-code flow this client initiates,
even when a client_secret is configured -- providers like Google and
Microsoft both require it for mobile public clients and tolerate it for
confidential clients.
- Since:
- 7.0.245
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAlways"S256"-- the only valueOidcClientemits. -
Method Summary
Modifier and TypeMethodDescriptionstatic PkceChallengegenerate()Generates a fresh PKCE pair with a 64-byte (~86 char) verifier.The challenge to include on the authorization URL ascode_challenge.Always returnsMETHOD_S256.The verifier that must be supplied to the token endpoint ascode_verifier.
-
Field Details
-
METHOD_S256
Always"S256"-- the only valueOidcClientemits. RFC 7636 also defines"plain"but it is forbidden by this client.- See Also:
-
-
Method Details
-
generate
Generates a fresh PKCE pair with a 64-byte (~86 char) verifier. The verifier characters are drawn from the unreserved set[A-Z][a-z][0-9]-._~via base64url encoding of secure random bytes, per RFC 7636 section 4.1. -
getVerifier
The verifier that must be supplied to the token endpoint ascode_verifier. -
getChallenge
The challenge to include on the authorization URL ascode_challenge. -
getMethod
Always returnsMETHOD_S256.
-