Package com.ocient.auth
Class OpenIDAuthenticators.AuthorizationCodeWithPKCEClient
java.lang.Object
com.ocient.auth.OpenIDAuthenticators.AuthorizationCodeWithPKCEClient
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
OpenIDAuthenticators
public static class OpenIDAuthenticators.AuthorizationCodeWithPKCEClient
extends Object
implements Closeable
The PKCE-enhanced Authorization Code Flow introduces a secret created by the calling
application that can be verified by the authorization server; this secret is called the Code
Verifier. Additionally, the calling app creates a transform value of the Code Verifier called
the Code Challenge and sends this value over HTTPS to retrieve an Authorization Code. This way,
a malicious attacker can only intercept the Authorization Code, and they cannot exchange it for
a token without the Code Verifier.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe authorization code is obtained by using an authorization server as an intermediary between the client and resource owner. -
Constructor Summary
ConstructorsConstructorDescriptionAuthorizationCodeWithPKCEClient(String host, int port, boolean debugMode, boolean SSLCallback, boolean acceptSelfSignedCerts) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()OpenIDAuthenticators.AuthorizationCodeWithPKCEClient.AuthorizationCodeGrant<OpenIDAuthenticators.OAuthToken> create(ClientWireProtocol.OpenIDAuthenticator authenticator) OpenIDAuthenticators.AuthorizationCodeWithPKCEClient.AuthorizationCodeGrant<OpenIDAuthenticators.OAuthToken> create(ClientWireProtocol.OpenIDAuthenticator authenticator, Map<String, String> additionalParameters) Begins the OAuth 2.0 Authorization Code w/ PKCE Flowvoidstart()
-
Constructor Details
-
AuthorizationCodeWithPKCEClient
public AuthorizationCodeWithPKCEClient(String host, int port, boolean debugMode, boolean SSLCallback, boolean acceptSelfSignedCerts)
-
-
Method Details
-
start
public void start() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
create
-
create
public OpenIDAuthenticators.AuthorizationCodeWithPKCEClient.AuthorizationCodeGrant<OpenIDAuthenticators.OAuthToken> create(ClientWireProtocol.OpenIDAuthenticator authenticator, Map<String, String> additionalParameters) throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, IOExceptionBegins the OAuth 2.0 Authorization Code w/ PKCE Flow- Parameters:
authenticator- the Authorization Server- Returns:
- an
OpenIDAuthenticators.AuthorizationCodeWithPKCEClient.AuthorizationCodeGrant - Throws:
NoSuchAlgorithmExceptionIOExceptionKeyStoreExceptionKeyManagementException
-