Skip to content

Native Auth Backward Compatibility feature, Fixes AB#3287604 #2305

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

Merged
merged 19 commits into from
Jun 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
6d55346
Add capabilities parameter to native auth public client application i…
Yuki-YuXin Jun 5, 2025
a121610
Handle redirect across all endpoints and return the redirect reason t…
Yuki-YuXin Jun 12, 2025
85e3875
Update submodule to point to branch feature
Yuki-YuXin Jun 12, 2025
ca3717f
update submodule reference
Yuki-YuXin Jun 12, 2025
d38c83a
Point to the feature/backward-compatibility
Yuki-YuXin Jun 12, 2025
5087bbd
Update NativeAuthPublicClientApplicationAbstractTest.kt and consuming…
Yuki-YuXin Jun 13, 2025
fb136f4
Append E2E test for MFA and JIT
Yuki-YuXin Jun 13, 2025
4793c85
Fix authorities default null issue and Use new createNativeAuthPublic…
Yuki-YuXin Jun 13, 2025
5998f7d
Fix defaultCapabilities = listOf("mfa_required", "registration_requir…
Yuki-YuXin Jun 13, 2025
ab565b9
After changes under getAuthorities inside PublicClientApplicationConf…
Yuki-YuXin Jun 13, 2025
cfc32cb
Authority and Command add capabilities
Yuki-YuXin Jun 16, 2025
6833550
update latest feature branch common submodule reference
Yuki-YuXin Jun 18, 2025
274641f
Address comments: 1) update the comment 2) add redirect reason assertion
Yuki-YuXin Jun 18, 2025
7d5d10a
Use parameter instead of config when initialization (#2313)
Yuki-YuXin Jun 19, 2025
e715d8e
update submodule reference
Yuki-YuXin Jun 20, 2025
0c748ea
Merge branch 'dev' into feature/backward-compatibility
Yuki-YuXin Jun 20, 2025
69f2ee8
Merge branch 'dev' into feature/backward-compatibility
Yuki-YuXin Jun 21, 2025
3c68246
Address comments
Yuki-YuXin Jun 21, 2025
89ed0df
Address comments
Yuki-YuXin Jun 23, 2025
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
2 changes: 1 addition & 1 deletion common
Submodule common updated 69 files
+1 −1 ...lities/src/main/com/microsoft/identity/labapi/utilities/authentication/common/MicrosoftClientAssertion.java
+2 −2 azure-pipelines/pull-request-validation/build-consumers.yml
+1 −1 azure-pipelines/pull-request-validation/common.yml
+1 −1 azure-pipelines/pull-request-validation/common4j.yml
+1 −1 azure-pipelines/pull-request-validation/lab-utilities.yml
+2 −3 changelog.txt
+2 −1 common/build.gradle
+0 −137 common/src/androidTest/java/com/microsoft/identity/common/internal/platform/AndroidKeyStoreAccessorTests.java
+0 −99 common/src/androidTest/java/com/microsoft/identity/common/internal/platform/RawKeyAccessorTest.java
+0 −298 common/src/main/java/com/microsoft/identity/common/internal/platform/AndroidKeyStoreAccessor.java
+0 −204 common/src/main/java/com/microsoft/identity/common/internal/platform/AndroidSecretKeyAccessor.java
+19 −0 common/src/main/java/com/microsoft/identity/common/internal/ui/DualScreenActivity.java
+101 −23 common/src/main/java/com/microsoft/identity/common/nativeauth/internal/controllers/NativeAuthMsalController.kt
+217 −0 ...a/com/microsoft/identity/common/internal/providers/microsoft/nativeauth/integration/JITOAuthStrategyTest.kt
+88 −2 ...soft/identity/common/internal/providers/microsoft/nativeauth/integration/ResetPasswordOAuth2StrategyTest.kt
+8 −2 ...om/microsoft/identity/common/internal/providers/microsoft/nativeauth/integration/SignInOAuthStrategyTest.kt
+28 −1 ...m/microsoft/identity/common/internal/providers/microsoft/nativeauth/integration/SignUpOAuth2StrategyTest.kt
+4 −1 common/src/test/java/com/microsoft/identity/common/nativeauth/util/CommandResultUtilTest.kt
+0 −282 common4j/src/main/com/microsoft/identity/common/java/crypto/RawKeyAccessor.java
+6 −1 common4j/src/main/com/microsoft/identity/common/java/flighting/CommonFlight.java
+14 −3 common4j/src/main/com/microsoft/identity/common/java/nativeauth/authorities/NativeAuthCIAMAuthority.kt
+6 −0 ...main/com/microsoft/identity/common/java/nativeauth/commands/parameters/BaseNativeAuthCommandParameters.java
+7 −7 ...on4j/src/main/com/microsoft/identity/common/java/nativeauth/controllers/results/INativeAuthCommandResult.kt
+10 −3 common4j/src/main/com/microsoft/identity/common/java/nativeauth/providers/INativeAuthApiResponse.kt
+14 −1 common4j/src/main/com/microsoft/identity/common/java/nativeauth/providers/NativeAuthConstants.kt
+1 −0 common4j/src/main/com/microsoft/identity/common/java/nativeauth/providers/NativeAuthOAuth2Configuration.kt
+7 −4 common4j/src/main/com/microsoft/identity/common/java/nativeauth/providers/NativeAuthRequestProvider.kt
+36 −10 common4j/src/main/com/microsoft/identity/common/java/nativeauth/providers/NativeAuthResponseHandler.kt
+7 −4 ...com/microsoft/identity/common/java/nativeauth/providers/requests/resetpassword/ResetPasswordStartRequest.kt
+7 −4 ...j/src/main/com/microsoft/identity/common/java/nativeauth/providers/requests/signin/SignInInitiateRequest.kt
+7 −4 ...on4j/src/main/com/microsoft/identity/common/java/nativeauth/providers/requests/signup/SignUpStartRequest.kt
+18 −8 ...j/src/main/com/microsoft/identity/common/java/nativeauth/providers/responses/jit/JITChallengeApiResponse.kt
+10 −0 ...n4j/src/main/com/microsoft/identity/common/java/nativeauth/providers/responses/jit/JITChallengeApiResult.kt
+17 −7 ...4j/src/main/com/microsoft/identity/common/java/nativeauth/providers/responses/jit/JITContinueApiResponse.kt
+10 −0 ...on4j/src/main/com/microsoft/identity/common/java/nativeauth/providers/responses/jit/JITContinueApiResult.kt
+16 −8 .../src/main/com/microsoft/identity/common/java/nativeauth/providers/responses/jit/JITIntrospectApiResponse.kt
+10 −0 ...4j/src/main/com/microsoft/identity/common/java/nativeauth/providers/responses/jit/JITIntrospectApiResult.kt
+11 −9 ...soft/identity/common/java/nativeauth/providers/responses/resetpassword/ResetPasswordChallengeApiResponse.kt
+3 −2 ...rosoft/identity/common/java/nativeauth/providers/responses/resetpassword/ResetPasswordChallengeApiResult.kt
+12 −10 ...osoft/identity/common/java/nativeauth/providers/responses/resetpassword/ResetPasswordContinueApiResponse.kt
+2 −1 ...crosoft/identity/common/java/nativeauth/providers/responses/resetpassword/ResetPasswordContinueApiResult.kt
+19 −9 ...identity/common/java/nativeauth/providers/responses/resetpassword/ResetPasswordPollCompletionApiResponse.kt
+13 −1 ...t/identity/common/java/nativeauth/providers/responses/resetpassword/ResetPasswordPollCompletionApiResult.kt
+11 −9 ...icrosoft/identity/common/java/nativeauth/providers/responses/resetpassword/ResetPasswordStartApiResponse.kt
+2 −1 .../microsoft/identity/common/java/nativeauth/providers/responses/resetpassword/ResetPasswordStartApiResult.kt
+18 −9 ...crosoft/identity/common/java/nativeauth/providers/responses/resetpassword/ResetPasswordSubmitApiResponse.kt
+11 −0 ...microsoft/identity/common/java/nativeauth/providers/responses/resetpassword/ResetPasswordSubmitApiResult.kt
+47 −0 ...microsoft/identity/common/java/nativeauth/providers/responses/signin/NativeAuthMicrosoftStsTokenResponse.kt
+12 −11 ...main/com/microsoft/identity/common/java/nativeauth/providers/responses/signin/SignInChallengeApiResponse.kt
+3 −2 ...c/main/com/microsoft/identity/common/java/nativeauth/providers/responses/signin/SignInChallengeApiResult.kt
+11 −9 .../main/com/microsoft/identity/common/java/nativeauth/providers/responses/signin/SignInInitiateApiResponse.kt
+3 −2 ...rc/main/com/microsoft/identity/common/java/nativeauth/providers/responses/signin/SignInInitiateApiResult.kt
+11 −10 ...ain/com/microsoft/identity/common/java/nativeauth/providers/responses/signin/SignInIntrospectApiResponse.kt
+3 −2 .../main/com/microsoft/identity/common/java/nativeauth/providers/responses/signin/SignInIntrospectApiResult.kt
+7 −7 ...src/main/com/microsoft/identity/common/java/nativeauth/providers/responses/signin/SignInTokenApiResponse.kt
+12 −0 ...j/src/main/com/microsoft/identity/common/java/nativeauth/providers/responses/signin/SignInTokenApiResult.kt
+11 −9 ...main/com/microsoft/identity/common/java/nativeauth/providers/responses/signup/SignUpChallengeApiResponse.kt
+3 −2 ...c/main/com/microsoft/identity/common/java/nativeauth/providers/responses/signup/SignUpChallengeApiResult.kt
+18 −7 .../main/com/microsoft/identity/common/java/nativeauth/providers/responses/signup/SignUpContinueApiResponse.kt
+2 −1 ...rc/main/com/microsoft/identity/common/java/nativeauth/providers/responses/signup/SignUpContinueApiResult.kt
+12 −10 ...src/main/com/microsoft/identity/common/java/nativeauth/providers/responses/signup/SignUpStartApiResponse.kt
+3 −2 ...j/src/main/com/microsoft/identity/common/java/nativeauth/providers/responses/signup/SignUpStartApiResult.kt
+2 −2 common4j/src/main/com/microsoft/identity/common/java/nativeauth/util/ApiResultUtil.kt
+10 −0 common4j/src/main/com/microsoft/identity/common/java/providers/oauth2/OAuth2StrategyParameters.java
+162 −0 common4j/src/test/com/microsoft/identity/common/java/nativeauth/providers/NativeAuthRequestProviderTest.kt
+439 −75 common4j/src/test/com/microsoft/identity/common/java/nativeauth/providers/NativeAuthResponseHandlerTest.kt
+1 −1 common4j/versioning/version.properties
+1 −0 gradle/versions.gradle
+1 −1 versioning/version.properties
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@
import com.microsoft.identity.common.java.commands.parameters.GenerateShrCommandParameters;
import com.microsoft.identity.common.java.commands.parameters.InteractiveTokenCommandParameters;
import com.microsoft.identity.common.java.commands.parameters.SilentTokenCommandParameters;
import com.microsoft.identity.common.java.controllers.BaseController;
import com.microsoft.identity.common.java.controllers.CommandDispatcher;
import com.microsoft.identity.common.java.controllers.CommandResult;
import com.microsoft.identity.common.java.controllers.ExceptionAdapter;
Expand Down Expand Up @@ -143,6 +142,7 @@
import com.microsoft.identity.nativeauth.INativeAuthPublicClientApplication;
import com.microsoft.identity.nativeauth.NativeAuthPublicClientApplication;
import com.microsoft.identity.nativeauth.NativeAuthPublicClientApplicationConfiguration;
import com.microsoft.identity.nativeauth.NativeAuthPublicClientApplicationParameters;

import java.io.File;
import java.util.ArrayList;
Expand Down Expand Up @@ -237,6 +237,7 @@ static class NONNULL_CONSTANTS {
static final String AUTHORITY = "authority";
static final String REDIRECT_URI = "redirect_uri";
static final String CONFIG_FILE = "config_file";
static final String CLIENT_PARAMETER = "client_parameter";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Client_parameter? Should this be "capabilities"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this PR, a new parameter class is introduced to all those config parameters (also capabilities) to provide extension for the future.

static final String ACTIVITY = "activity";
static final String SCOPES = "scopes";
static final String ACCOUNT = "account";
Expand Down Expand Up @@ -846,6 +847,7 @@ public static INativeAuthPublicClientApplication createNativeAuthPublicClientApp
null,
null,
null,
null,
null
);
} catch (MsalException e) {
Expand Down Expand Up @@ -897,6 +899,7 @@ public static INativeAuthPublicClientApplication createNativeAuthPublicClientApp
null,
null,
null,
null,
null
);
} catch (BaseException e) {
Expand Down Expand Up @@ -928,8 +931,12 @@ public static INativeAuthPublicClientApplication createNativeAuthPublicClientApp
* @param clientId The application client id. Cannot be null.
* @param authority The default authority to be used for the authority. If this is null, the default authority will be used.
* @param redirectUri The redirect URI of the application.
* @param challengeTypes The challengeTypes supported for authentication declared by client.
* @return An instance of INativeAuthPublicClientApplication.
*
* @deprecated This method is deprecated. Use createNativeAuthPublicClientApplication(Context, NativeAuthPublicClientApplicationConfiguration) instead.
*/
@Deprecated
public static INativeAuthPublicClientApplication createNativeAuthPublicClientApplication(
@NonNull final Context context,
@NonNull final String clientId,
Expand All @@ -947,7 +954,59 @@ public static INativeAuthPublicClientApplication createNativeAuthPublicClientApp
clientId,
authority,
redirectUri,
challengeTypes
challengeTypes,
null
);
} catch (BaseException e) {
throw new MsalClientException(
UNKNOWN_ERROR,
NATIVE_AUTH_APPLICATION_CREATION_UNKNOWN_ERROR_MESSAGE,
e
);
}
}

/**
* Creates an instance of INativeAuthPublicClientApplication using the provided context and configuration.
*
* <p>{@link PublicClientApplication#createNativeAuthPublicClientApplication(Context, NativeAuthPublicClientApplicationParameters)}
* will read the client id and other configuration settings from the provided configuration object.</p>
*
* <p>This function will pass back an {@link MsalClientException} object if it is unable
* to return {@link INativeAuthPublicClientApplication}. For example, AccountMode
* in configuration is not set to single.</p>
*
* @param context Application's {@link Context}. The SDK requires the application context
* to be passed in {@link PublicClientApplication}. Cannot be null.
* <p>
* Note: The {@link Context} should be the application context instead of
* the running activity's context, which could potentially make the SDK hold a
* strong reference to the activity, thus preventing correct garbage
* collection and causing bugs.
* </p>
* @param parameters The NativeAuthPublicClientApplication parameter class containing mandatory client ID, authorityUri, challenge types and optional capabilities, redirectUri.
* Cannot be null.
* <p>
* For more information on the schema of the MSAL configuration object,
* please see <a href="https://developer.android.com/guide/topics/resources/providing-resources">Android app resource overview</a>
* and <a href="https://github.com/AzureAD/microsoft-authentication-library-for-android/wiki">MSAL Github Wiki</a>.
* </p>
* @return An instance of INativeAuthPublicClientApplication.
*/
public static INativeAuthPublicClientApplication createNativeAuthPublicClientApplication(
@NonNull final Context context,
@NonNull final NativeAuthPublicClientApplicationParameters parameters) throws MsalException {
validateNonNullArgument(context, NONNULL_CONSTANTS.CONTEXT);
validateNonNullArgument(parameters, NONNULL_CONSTANTS.CLIENT_PARAMETER);

try {
return createNativeAuthApplication(
Companion.initializeNativeAuthConfiguration(context),
parameters.getClientId(),
parameters.getAuthorityUrl(),
parameters.getRedirectUri(),
parameters.getChallengeTypes(),
parameters.getCapabilities()
);
} catch (BaseException e) {
throw new MsalClientException(
Expand Down Expand Up @@ -1133,7 +1192,8 @@ private static NativeAuthPublicClientApplication createNativeAuthApplication(@No
@Nullable final String clientId,
@Nullable final String authority,
@Nullable final String redirectUri,
@Nullable final List<String> challengeTypes) throws BaseException {
@Nullable final List<String> challengeTypes,
@Nullable final List<String> capabilities) throws BaseException {
if (clientId != null) {
config.setClientId(clientId);
}
Expand All @@ -1154,6 +1214,10 @@ private static NativeAuthPublicClientApplication createNativeAuthApplication(@No
config.setChallengeTypes(challengeTypes);
}

if (capabilities != null) {
config.setCapabilities(capabilities);
}

// Check whether account mode is set to SINGLE
validateAccountModeConfiguration(config);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,9 @@ public final class MsalClientException extends MsalException {
* Configuration error. Native auth app passed with an invalid challenge type.
*/
public static final String NATIVE_AUTH_INVALID_CHALLENGE_TYPE_ERROR_CODE = "native_auth_invalid_challenge_type";
public static final String NATIVE_AUTH_INVALID_CAPABILITY_ERROR_CODE = "native_auth_invalid_capability";
public static final String NATIVE_AUTH_INVALID_CHALLENGE_TYPE_ERROR_MESSAGE = "NativeAuthPublicClientApplication detected invalid challenge type.";
public static final String NATIVE_AUTH_INVALID_CAPABILITY_ERROR_MESSAGE = "NativeAuthPublicClientApplication detected invalid capability.";

public MsalClientException(final String errorCode) {
super(errorCode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ public static SignUpStartCommandParameters createSignUpStartCommandParameters(
.username(username)
.password(password)
.challengeType(configuration.getChallengeTypes())
.capabilities(configuration.getCapabilities())
.userAttributes(userAttributes)
// Start of the flow, so there is no correlation ID to use from a previous API response.
// Set it to a default value.
Expand Down Expand Up @@ -569,6 +570,7 @@ public static SignInStartCommandParameters createSignInStartCommandParameters(
.authenticationScheme(authenticationScheme)
.clientId(configuration.getClientId())
.challengeType(configuration.getChallengeTypes())
.capabilities(configuration.getCapabilities())
.claimsRequestJson(claimsRequestJson)
.scopes(scopes)
// Start of the flow, so there is no correlation ID to use from a previous API response.
Expand Down Expand Up @@ -993,6 +995,7 @@ public static ResetPasswordStartCommandParameters createResetPasswordStartComman
.authority(authority)
.username(username)
.challengeType(configuration.getChallengeTypes())
.capabilities(configuration.getCapabilities())
.clientId(configuration.getClientId())
// Start of the flow, so there is no correlation ID to use from a previous API response.
// Set it to a default value.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ public class NativeAuthPublicClientApplicationConfiguration :
private val TAG = NativeAuthPublicClientApplicationConfiguration::class.java.simpleName
private val VALID_CHALLENGE_TYPES = listOf(NativeAuthConstants.ChallengeType.PASSWORD,
NativeAuthConstants.ChallengeType.OOB, NativeAuthConstants.ChallengeType.REDIRECT)
private val VALID_CAPABILITIES = listOf(NativeAuthConstants.Capabilities.MFA_REQUIRED,
NativeAuthConstants.Capabilities.REGISTRATION_REQUIRED)
}

private object NativeAuthSerializedNames {
const val CHALLENGE_TYPES = "challenge_types"
const val CAPABILITIES = "capabilities"
const val USE_MOCK_API = "use_mock_api_for_native_auth"
const val DC = "dc"
}
Expand All @@ -61,6 +64,11 @@ public class NativeAuthPublicClientApplicationConfiguration :
@SerializedName(NativeAuthSerializedNames.CHALLENGE_TYPES)
private var challengeTypes: List<String>? = null

//List of capabilities supported by the client.
//For a complete list of capabilities see [NativeAuthConstants.Capabilities]
@SerializedName(NativeAuthSerializedNames.CAPABILITIES)
private var capabilities: List<String>? = null

//The mock API authority used for testing will be rejected by validation logic run on
// instantiation. This flag is used to bypass those checks in various points in the application
@SerializedName(NativeAuthSerializedNames.USE_MOCK_API)
Expand All @@ -79,6 +87,14 @@ public class NativeAuthPublicClientApplicationConfiguration :
this.challengeTypes = challengeTypes
}

fun getCapabilities(): List<String>? {
return capabilities
}

fun setCapabilities(capabilities: List<String>?) {
this.capabilities = capabilities
}

fun mergeConfiguration(config: NativeAuthPublicClientApplicationConfiguration) {
// Call super.mergeConfiguration to handle base configuration fields
super.mergeConfiguration(config)
Expand All @@ -91,6 +107,8 @@ public class NativeAuthPublicClientApplicationConfiguration :
// Handle Native Auth specific fields
challengeTypes = if (config.challengeTypes == null) challengeTypes else config.challengeTypes

capabilities = if (config.capabilities == null) capabilities else config.capabilities

useMockAuthority = if (config.useMockAuthority == null) useMockAuthority else config.useMockAuthority

dc = if (config.dc == null) dc else config.dc
Expand Down Expand Up @@ -174,15 +192,21 @@ public class NativeAuthPublicClientApplicationConfiguration :

// Check that challenge types are all valid
validateChallengeTypes()
// Check that capabilities are all valid
validateCapabilities()
}

/**
* Validates that the challenge types passed are valid
*/
@Throws(MsalClientException::class)
private fun validateChallengeTypes() {
// Make all challenge types lowercase for simplicity
challengeTypes = challengeTypes?.map { it.lowercase() }

// Remove duplicate capabilities
challengeTypes = challengeTypes?.distinct()

challengeTypes?.forEach { challengeType ->
// Make sure challenge types passed were valid
if (challengeType !in VALID_CHALLENGE_TYPES) {
Expand All @@ -194,6 +218,28 @@ public class NativeAuthPublicClientApplicationConfiguration :
}
}

/**
* Validates that the capabilities passed are valid
*/
@Throws(MsalClientException::class)
private fun validateCapabilities() {
// Make all capabilities lowercase for simplicity
capabilities = capabilities?.map { it.lowercase() }

// Remove duplicate capabilities
capabilities = capabilities?.distinct()

capabilities?.forEach { capability ->
// Make sure capabilities passed were valid
if (capability !in VALID_CAPABILITIES) {
throw MsalClientException(
MsalClientException.NATIVE_AUTH_INVALID_CAPABILITY_ERROR_CODE,
MsalClientException.NATIVE_AUTH_INVALID_CAPABILITY_ERROR_MESSAGE + " \"" + capability + "\""
)
}
}
}

/**
* Overriding this method to add a check for redirect uri. If no uri was passed, we don't need to check this.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// Copyright (c) Microsoft Corporation.
// All rights reserved.
//
// This code is licensed under the MIT License.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files(the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions :
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

package com.microsoft.identity.nativeauth


public class NativeAuthPublicClientApplicationParameters (
/**
* The application client id. Cannot be null.
*/
val clientId: String,
/**
* The authorityUrl to be used for the authority.
*/
val authorityUrl: String,
/**
* The challenge types supported for authentication declared by client. Cannot be null.
*/
val challengeTypes: List<String>,
) {

/**
* The capabilities supported for authentication declared by client.
*/
var capabilities: List<String>? = null

/**
* The redirect URI of the application. Required for using browser.
*/
var redirectUri: String? = null
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
// Copyright (c) Microsoft Corporation.
// All rights reserved.
//
// This code is licensed under the MIT License.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files(the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions :
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

package com.microsoft.identity.nativeauth.parameters

import com.microsoft.identity.nativeauth.AuthMethod
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
// Copyright (c) Microsoft Corporation.
// All rights reserved.
//
// This code is licensed under the MIT License.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files(the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions :
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

package com.microsoft.identity.nativeauth.parameters

import com.microsoft.identity.nativeauth.statemachine.states.RegisterStrongAuthVerificationRequiredState
Expand Down
Loading