Skip to content

Latest commit

 

History

History
86 lines (55 loc) · 4.15 KB

MIGRATING.md

File metadata and controls

86 lines (55 loc) · 4.15 KB

Okta Java Authentication SDK Migration Guide

This guide intends to outline the details needed for a developer to migrate from Java Auth SDK to Okta IDX SDK.

Migrating from Java Auth SDK 2.x to Java IDX SDK 1.x

The previous version of this library, Okta Java Auth SDK, has been rewritten from the ground up as Okta IDX Java SDK. This was done to take advantage of the OIE features available via the IDX API.

Since we are using a different set of APIs and patterns, a new library was published starting with 1.0.0

Getting started

Prerequisites

To use this SDK, you will need to include the following dependencies:

For Apache Maven:

<dependency>
    <groupId>com.okta.idx.sdk</groupId>
    <artifactId>okta-idx-java-api</artifactId>
    <version>${okta.sdk.version}</version>
</dependency>

where {okta.sdk.version} is the Java IDX SDK version.

For Gradle:

compile "com.okta.idx.sdk:okta-idx-java-api:${okta.sdk.version}"

where okta.sdk.version is the latest stable release version here.

For more information check out the IDX SDK Repository.

New configuration model

In order to use the IDXAuthenticationWrapper client, you will need to configure additional properties. For more information, check out our embedded Auth guide.

The simplest way to construct a client is via code:

IDXAuthenticationWrapper idxAuthenticationWrapper = new IDXAuthenticationWrapper(
        "{issuer}",
        "{clientId}",
        "{clientSecret}",
        "{scopes}", // space separated e.g. "openid email profile"
        "{redirectUri}"); // should match your app redirect uri set via console

Note: For additional configuration options, check out the IDX SDK Configuration Reference.

New methods

In the table below, you can see the methods available in the IDX client and their equivalent ones in the Auth SDK. For guidance about usage, check out here.

Before Now Description
authenticate authenticate Authenticates a user with username/password credentials
resetPassword
recoverPassword
recoverPassword Changes user''s password
activateFactor
verifyFactor
selectFactor Activate a factor
skip skipAuthenticatorEnrollment Skips an optional authenticator during enrollment/verification
answerRecoveryQuestion
cancel
N/A Out of Scope
verifyActivation
sendActivationEmail
resendVerifyFactor
resendActivateFactor
N/A
unlockAccount
verifyUnlockAccount
N/A

Authentication Response

Similar to the Auth SDK, the IDX wrapper client return a response with an Authentication status that indicates how to proceed with the authentication flow. Check out the Authentication Status section here for more details.

Handling errors

The SDK throws ProcessingException everytime the server responds with an invalid status code, or if there is an internal error. You can get more information by calling exception.getErrorResponse().

Getting help

If you have questions about this library or about the Okta APIs, post a question on our Developer Forum.

If you find a bug or have a feature request for the IDX library specifically, post an issue here on GitHub.