-
Notifications
You must be signed in to change notification settings - Fork 167
refactor : Deprecate the existing MFA APIs in AuthenticationAPIClient
#932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -174,6 +174,7 @@ public class AuthenticationAPIClient @VisibleForTesting(otherwise = VisibleForTe | |
| return loginWithToken(requestParameters) | ||
| } | ||
|
|
||
|
|
||
| /** | ||
| * Log in a user using the One Time Password code after they have received the 'mfa_required' error. | ||
| * The MFA token tells the server the username or email, password, and realm values sent on the first request. | ||
|
|
@@ -196,6 +197,10 @@ public class AuthenticationAPIClient @VisibleForTesting(otherwise = VisibleForTe | |
| * MFA application such as Google Authenticator or Guardian. | ||
| * @return a request to configure and start that will yield [Credentials] | ||
| */ | ||
| @Deprecated( | ||
| message = "loginWithOTP is deprecated and will be removed in the next major version of the SDK. Use the APIs in the [com.auth0.android.authentication.mfa.MfaApiClient] class instead.", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we can use replaceWith so that Same for others
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The advantage of using replaceWith is that this will automatically let the IDE make the suggested changes. Two caveat in this scenario is
|
||
| level = DeprecationLevel.WARNING | ||
| ) | ||
| public fun loginWithOTP(mfaToken: String, otp: String): AuthenticationRequest { | ||
| val parameters = ParameterBuilder.newBuilder() | ||
| .setGrantType(ParameterBuilder.GRANT_TYPE_MFA_OTP) | ||
|
|
@@ -409,6 +414,10 @@ public class AuthenticationAPIClient @VisibleForTesting(otherwise = VisibleForTe | |
| * This is usually an OTP-like code delivered as part of the challenge message. | ||
| * @return a request to configure and start that will yield [Credentials] | ||
| */ | ||
| @Deprecated( | ||
| message = "loginWithOOB is deprecated and will be removed in the next major version of the SDK. Use the APIs in the [com.auth0.android.authentication.mfa.MfaApiClient] class instead.", | ||
| level = DeprecationLevel.WARNING | ||
| ) | ||
| public fun loginWithOOB( | ||
| mfaToken: String, | ||
| oobCode: String, | ||
|
|
@@ -445,6 +454,10 @@ public class AuthenticationAPIClient @VisibleForTesting(otherwise = VisibleForTe | |
| * @return a request to configure and start that will yield [Credentials]. It might also include a [recoveryCode] field, | ||
| * which your application must display to the end-user to be stored securely for future use. | ||
| */ | ||
| @Deprecated( | ||
| message = "loginWithRecoveryCode is deprecated and will be removed in the next major version of the SDK. Use the APIs in the [com.auth0.android.authentication.mfa.MfaApiClient] class instead.", | ||
| level = DeprecationLevel.WARNING | ||
| ) | ||
| public fun loginWithRecoveryCode( | ||
| mfaToken: String, | ||
| recoveryCode: String | ||
|
|
@@ -478,6 +491,10 @@ public class AuthenticationAPIClient @VisibleForTesting(otherwise = VisibleForTe | |
| * @param authenticatorId The ID of the authenticator to challenge. | ||
| * @return a request to configure and start that will yield [Challenge] | ||
| */ | ||
| @Deprecated( | ||
| message = "multifactorChallenge is deprecated and will be removed in the next major version of the SDK. Use the APIs in the [com.auth0.android.authentication.mfa.MfaApiClient] class instead.", | ||
| level = DeprecationLevel.WARNING | ||
| ) | ||
pmathew92 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| public fun multifactorChallenge( | ||
| mfaToken: String, | ||
| challengeType: String? = null, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please make it in one line :
message = "loginWithOTP is deprecated and will be removed in the next major version. Use MfaApiClient.verify(MfaVerificationType.Otp) instead.",
reason:
the display to developers when using in their ids will show in one line.
Same can be done for:
(loginWithOTP)
(loginWithOOB)
(loginWithRecoveryCode)
(multifactorChallenge)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is single line. It is being shown as two line here in the PR