Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ interface SignInResult : Result {
/**
* MFARequired Result, which indicates that the multi-factor authentication is needed.
*
* <strong><u>Warning: this class is experimental. It may be changed in the future without notice. Do not use in production applications.</u></strong>
* @param nextState [com.microsoft.identity.nativeauth.statemachine.states.AwaitingMFAState] the current state of the flow with follow-on methods.
*/
class MFARequired(
Expand All @@ -88,7 +87,6 @@ interface SignInResult : Result {
/**
* StrongAuthMethodRegistration Result, which indicates that a registration of a strong authentication method is required to continue.
*
* <strong><u>Warning: this class is experimental. It may be changed in the future without notice. Do not use in production applications.</u></strong>
* @param nextState [com.microsoft.identity.nativeauth.statemachine.states.RegisterStrongAuthState] the current state of the flow with follow-on methods.
*/
class StrongAuthMethodRegistrationRequired(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ abstract class BaseJITSubmitChallengeState(
private val config: NativeAuthPublicClientApplicationConfiguration
) : BaseState(continuationToken = continuationToken, correlationId = correlationId), State, Parcelable {
suspend fun internalChallengeAuthMethod(parameters: NativeAuthChallengeAuthMethodParameters, tag: String): RegisterStrongAuthChallengeResult {
Logger.warn(
tag,
"Warning: this API is experimental. It may be changed in the future without notice. Do not use in production applications."
)
// if external developer does not provide a verification contact, we use the login hint
val verificationContact: String = parameters.verificationContact.takeIf { !it.isNullOrBlank() } ?: parameters.authMethod.loginHint
// Currently, only email is supported for the challengeChannel. Continuation token grant type is used only for "preverified" flow.
Expand Down Expand Up @@ -151,7 +147,6 @@ class RegisterStrongAuthState(
/**
* Requests the server to send the challenge to the default authentication method; callback variant
*
* <strong><u>Warning: this API is experimental. It may be changed in the future without notice. Do not use in production applications.</u></strong>
* @param parameters [com.microsoft.identity.nativeauth.parameters.NativeAuthChallengeAuthMethodParameters] Parameters used to challenge an authentication method.
* @param callback [com.microsoft.identity.nativeauth.statemachine.states.RegisterStrongAuthState.ChallengeAuthMethodCallback] to receive the result on.
*/
Expand All @@ -175,7 +170,6 @@ class RegisterStrongAuthState(
/**
* Requests the server to send the challenge to the default authentication method; Kotlin coroutines variant.
*
* <strong><u>Warning: this API is experimental. It may be changed in the future without notice. Do not use in production applications.</u></strong>
* @param parameters [com.microsoft.identity.nativeauth.parameters.NativeAuthChallengeAuthMethodParameters] Parameters used to challenge an authentication method.
* @return The result of the challenge authentication method action.
*/
Expand Down Expand Up @@ -234,7 +228,6 @@ class RegisterStrongAuthVerificationRequiredState(
/**
* Submits the challenge value to the server; callback variant.
*
* <strong><u>Warning: this API is experimental. It may be changed in the future without notice. Do not use in production applications.</u></strong>
* @param challenge The challenge value to be submitted.
* @param callback [com.microsoft.identity.nativeauth.statemachine.states.RegisterStrongAuthState.SubmitChallengeCallback] to receive the result on.
*/
Expand All @@ -258,7 +251,6 @@ class RegisterStrongAuthVerificationRequiredState(
/**
* Submits the challenge value to the server; Kotlin coroutines variant.
*
* <strong><u>Warning: this API is experimental. It may be changed in the future without notice. Do not use in production applications.</u></strong>
* @param challenge The challenge value to be submitted.
* @return The results of the submit challenge action.
*/
Expand All @@ -269,10 +261,6 @@ class RegisterStrongAuthVerificationRequiredState(
methodName = "${TAG}.submitChallenge(challenge: String)"
)

Logger.warn(
TAG,
"Warning: this API is experimental. It may be changed in the future without notice. Do not use in production applications."
)
if (challenge.isBlank()) {
return RegisterStrongAuthSubmitChallengeError(
errorMessage = "Empty challenge provided.",
Expand Down Expand Up @@ -360,7 +348,6 @@ class RegisterStrongAuthVerificationRequiredState(
/**
* Requests the server to send the challenge to the default authentication method; callback variant
*
* <strong><u>Warning: this API is experimental. It may be changed in the future without notice. Do not use in production applications.</u></strong>
* @param parameters [com.microsoft.identity.nativeauth.parameters.NativeAuthChallengeAuthMethodParameters] Parameters used to challenge an authentication method.
* @param callback [com.microsoft.identity.nativeauth.statemachine.states.RegisterStrongAuthState.ChallengeAuthMethodCallback] to receive the result on.
*/
Expand All @@ -384,7 +371,6 @@ class RegisterStrongAuthVerificationRequiredState(
/**
* Requests the server to send the challenge to the default authentication method; Kotlin coroutines variant.
*
* <strong><u>Warning: this API is experimental. It may be changed in the future without notice. Do not use in production applications.</u></strong>
* @param parameters [com.microsoft.identity.nativeauth.parameters.NativeAuthChallengeAuthMethodParameters] Parameters used to challenge an authentication method.
* @return The result of the challenge authentication method action.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ class AwaitingMFAState(
/**
* Requests a challenge to be sent to the user's default authentication method; callback variant.
*
* <strong><u>Warning: this API is experimental. It may be changed in the future without notice. Do not use in production applications.</u></strong>
* @param callback [com.microsoft.identity.nativeauth.statemachine.states.AwaitingMFAState.RequestChallengeCallback] to receive the result on.
* @return The result of the request challenge action.
*/
Expand All @@ -100,7 +99,6 @@ class AwaitingMFAState(
/**
* Requests a challenge to be sent to the user's default authentication method; Kotlin coroutines variant.
*
* <strong><u>Warning: this API is experimental. It may be changed in the future without notice. Do not use in production applications.</u></strong>
* @return The result of the request challenge action.
*/
suspend fun requestChallenge(): MFARequiredResult {
Expand All @@ -110,8 +108,6 @@ class AwaitingMFAState(
methodName = "${TAG}.requestChallenge()"
)

Logger.warn(TAG, "Warning: this API is experimental. It may be changed in the future without notice. Do not use in production applications.")

return withContext(Dispatchers.IO) {
try {
val params = CommandParametersAdapter.createMFADefaultChallengeCommandParameters(
Expand Down Expand Up @@ -237,7 +233,6 @@ class MFARequiredState(
/**
* Retrieves all authentication methods that can be used to complete the challenge flow; callback variant.
*
* <strong><u>Warning: this API is experimental. It may be changed in the future without notice. Do not use in production applications.</u></strong>
* @param callback [com.microsoft.identity.nativeauth.statemachine.states.MFARequiredState.GetAuthMethodsCallback] to receive the result on.
* @return The results of the get authentication methods action.
*/
Expand All @@ -261,7 +256,6 @@ class MFARequiredState(
/**
* Retrieves all authentication methods that can be used to complete the challenge flow; Kotlin coroutines variant.
*
* <strong><u>Warning: this API is experimental. It may be changed in the future without notice. Do not use in production applications.</u></strong>
* @return The results of the get authentication methods action.
*/
suspend fun getAuthMethods(): MFAGetAuthMethodsResult {
Expand All @@ -271,8 +265,6 @@ class MFARequiredState(
methodName = "${TAG}.getAuthMethods()"
)

Logger.warn(TAG, "Warning: this API is experimental. It may be changed in the future without notice. Do not use in production applications.")

return withContext(Dispatchers.IO) {
try {
val params = CommandParametersAdapter.createGetAuthMethodsCommandParameters(
Expand Down Expand Up @@ -349,7 +341,6 @@ class MFARequiredState(
* If an authentication method ID was supplied, the server will send a challenge to the specified method. If no ID is supplied,
* the server will attempt to send the challenge to the user's default auth method.
*
* <strong><u>Warning: this API is experimental. It may be changed in the future without notice. Do not use in production applications.</u></strong>
* @param authMethod [com.microsoft.identity.nativeauth.AuthMethod] the authentication method used for the challenge operation.
* @param callback [com.microsoft.identity.nativeauth.statemachine.states.MFARequiredState.RequestChallengeCallback] to receive the result on.
* @return The result of the request challenge action.
Expand All @@ -376,7 +367,6 @@ class MFARequiredState(
* If an authentication method ID was supplied, the server will send a challenge to the specified method. If no ID is supplied,
* the server will attempt to send the challenge to the user's default auth method.
*
* <strong><u>Warning: this API is experimental. It may be changed in the future without notice. Do not use in production applications.</u></strong>
* @param authMethod [com.microsoft.identity.nativeauth.AuthMethod] the authentication method used for the challenge operation.
* @return The result of the request challenge action.
*/
Expand All @@ -387,8 +377,6 @@ class MFARequiredState(
methodName = "${TAG}.requestChallenge(authMethod: AuthMethod)"
)

Logger.warn(TAG, "Warning: this API is experimental. It may be changed in the future without notice. Do not use in production applications.")

return withContext(Dispatchers.IO) {
try {
val params = if (authMethod != null) {
Expand Down Expand Up @@ -488,7 +476,6 @@ class MFARequiredState(
/**
* Submits the challenge value to the server; callback variant.
*
* <strong><u>Warning: this API is experimental. It may be changed in the future without notice. Do not use in production applications.</u></strong>
* @param callback [com.microsoft.identity.nativeauth.statemachine.states.MFARequiredState.SubmitChallengeCallback] to receive the result on.
* @return The result of the submit challenge action.
*/
Expand All @@ -512,7 +499,6 @@ class MFARequiredState(
/**
* Submits the challenge value to the server; Kotlin coroutines variant.
*
* <strong><u>Warning: this API is experimental. It may be changed in the future without notice. Do not use in production applications.</u></strong>
* @return The result of the submit challenge action.
*/
suspend fun submitChallenge(challenge: String): MFASubmitChallengeResult {
Expand All @@ -522,8 +508,6 @@ class MFARequiredState(
methodName = "${TAG}.submitChallenge(challenge: String)"
)

Logger.warn(TAG, "Warning: this API is experimental. It may be changed in the future without notice. Do not use in production applications.")

return withContext(Dispatchers.IO) {
try {
val params = CommandParametersAdapter.createMFASubmitChallengeCommandParameters(
Expand Down