Package com.ocient.auth
Class OktaAuthenticators.OktaAuthenticationClient
java.lang.Object
com.ocient.auth.OktaAuthenticators.OktaAuthenticationClient
- Enclosing class:
- OktaAuthenticators
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcreateSessionToken(ClientWireProtocol.OpenIDAuthenticator authenticator, String oktaUsername, char[] oktaPassword) Authenticate the user with the Okta issuer and return the session tokenstatic OpenIDAuthenticators.AuthorizationCodeWithPKCEClient.AuthorizationCodeGrant<OpenIDAuthenticators.OAuthToken>exchangeSessionToken(OpenIDAuthenticators.AuthorizationCodeWithPKCEClient client, ClientWireProtocol.OpenIDAuthenticator authenticator, String sessionToken) Exchanges the given session token for an OAuth Token
-
Constructor Details
-
OktaAuthenticationClient
public OktaAuthenticationClient()
-
-
Method Details
-
createSessionToken
public static String createSessionToken(ClientWireProtocol.OpenIDAuthenticator authenticator, String oktaUsername, char[] oktaPassword) throws com.okta.authn.sdk.AuthenticationException, AuthException Authenticate the user with the Okta issuer and return the session tokenSee https://developer.okta.com/docs/reference/api/authn/
- Parameters:
authenticator-oktaUsername-oktaPassword-- Returns:
- Throws:
com.okta.authn.sdk.AuthenticationExceptionAuthException
-
exchangeSessionToken
public static OpenIDAuthenticators.AuthorizationCodeWithPKCEClient.AuthorizationCodeGrant<OpenIDAuthenticators.OAuthToken> exchangeSessionToken(OpenIDAuthenticators.AuthorizationCodeWithPKCEClient client, ClientWireProtocol.OpenIDAuthenticator authenticator, String sessionToken) throws KeyManagementException, UnsupportedEncodingException, MalformedURLException, NoSuchAlgorithmException, KeyStoreException, IOException, InterruptedException Exchanges the given session token for an OAuth Token- Parameters:
client-authenticator-sessionToken-- Returns:
- Throws:
IOExceptionKeyStoreExceptionNoSuchAlgorithmExceptionMalformedURLExceptionUnsupportedEncodingExceptionKeyManagementExceptionInterruptedException
-