Package com.ocient.auth

# Class OktaAuthenticators.OktaAuthenticationClient

java.lang.Object
com.ocient.auth.OktaAuthenticators.OktaAuthenticationClient

Enclosing class:
  OktaAuthenticators

    public static class OktaAuthenticators.OktaAuthenticationClient
    extends Object

## Constructor Summary

Constructors
Constructor | Description
--- | ---
`OktaAuthenticationClient()` |

## Method Summary

Modifier and Type | Method | Description
--- | --- | ---
`static String` | `createSessionToken​(ClientWireProtocol.OpenIDAuthenticator authenticator, String oktaUsername, char[] oktaPassword)` | Authenticate the user with the Okta issuer and return the session token See https://developer.okta.com/docs/reference/api/authn/
`static OpenIDAuthenticators.AuthorizationCodeWithPKCEClient.AuthorizationCodeGrant<OpenIDAuthenticators.OAuthToken>` | `exchangeSessionToken​(OpenIDAuthenticators.AuthorizationCodeWithPKCEClient client, ClientWireProtocol.OpenIDAuthenticator authenticator, String sessionToken)` | Exchanges the given session token for an OAuth Token

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### OktaAuthenticationClient

public OktaAuthenticationClient()

## Method Details

### createSessionToken

public static String createSessionToken​(ClientWireProtocol.OpenIDAuthenticator authenticator, String oktaUsername, char[] oktaPassword) throws Exception
Authenticate the user with the Okta issuer and return the session token See https://developer.okta.com/docs/reference/api/authn/

Parameters:
  `authenticator` -
  `oktaUsername` -
  `oktaPassword` -
Returns:
Throws:
  `Exception`

### exchangeSessionToken

public static OpenIDAuthenticators.AuthorizationCodeWithPKCEClient.AuthorizationCodeGrant<OpenIDAuthenticators.OAuthToken> exchangeSessionToken​(OpenIDAuthenticators.AuthorizationCodeWithPKCEClient client, ClientWireProtocol.OpenIDAuthenticator authenticator, String sessionToken) throws Exception
Exchanges the given session token for an OAuth Token

Parameters:
  `client` -
  `authenticator` -
  `sessionToken` -
Returns:
Throws:
  `Exception`