Class OAuth2AuthorizationRequest
java.lang.Object
com.codename1.backend.security.oauth2.client.OAuth2AuthorizationRequest
One user being sent to an identity provider: where to, and the three values
that tie the provider's answer back to this browser -- the
state, the
nonce the ID token must repeat, and the PKCE verifier whose hash went with
the request. It is kept, between the redirect out and the answer coming
back, by an AuthorizationRequestRepository.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfrom(ClientRegistration registration, String redirectUri) A request throughregistration, with a newstate,nonceand PKCE verifier of 256 random bits each.from(OAuth2AuthorizationRequest request) A builder that starts as a copy ofrequest.static OAuth2AuthorizationRequestThe requesttoMap()wrote, or null whenstoredis not one.What the request carries besides the parameters OAuth2 defines.The address the browser is sent to.The PKCE verifier.getNonce()The value the ID token must repeat, or null when no ID token is asked for.The address the provider is asked to answer at, which the exchange of the code must repeat exactly.getState()toMap()The request as a map of text, numbers and lists: what a session, or a cookie, can keep.
-
Method Details
-
from
public static OAuth2AuthorizationRequest.Builder from(ClientRegistration registration, String redirectUri) A request throughregistration, with a newstate,nonceand PKCE verifier of 256 random bits each. -
from
A builder that starts as a copy ofrequest. -
getRegistrationId
-
getAuthorizationUri
-
getClientId
-
getRedirectUri
The address the provider is asked to answer at, which the exchange of the code must repeat exactly. -
getScopes
-
getState
-
getNonce
The value the ID token must repeat, or null when no ID token is asked for. -
getCodeVerifier
The PKCE verifier. It never leaves this server except in the exchange of the code; the request carries its SHA-256. -
getAdditionalParameters
-
getAuthorizationRequestUri
The address the browser is sent to. -
toMap
-
fromMap
The requesttoMap()wrote, or null whenstoredis not one.
-