├── .github └── workflows │ ├── ci.yml │ ├── pull-request.yml │ └── validate-pr-ab-id.yml ├── .gitignore ├── CODEOWNERS ├── LICENSE ├── LabApiUtilities ├── .gitignore ├── build.gradle └── src │ ├── main │ └── com │ │ └── microsoft │ │ └── identity │ │ └── labapi │ │ └── utilities │ │ ├── authentication │ │ ├── IAccessTokenSupplier.java │ │ ├── IAuthenticationResult.java │ │ ├── IRefreshTokenSupplier.java │ │ ├── ITokenParameters.java │ │ ├── KeyVaultAuthenticationClient.java │ │ ├── KeyVaultCertificateBasedAuthenticationClient.java │ │ ├── LabApiAuthenticationClient.java │ │ ├── LabAuthenticationConstants.java │ │ ├── TokenParameters.java │ │ ├── adal4j │ │ │ ├── Adal4jAuthClient.java │ │ │ └── Adal4jAuthenticationResult.java │ │ ├── client │ │ │ ├── ConfidentialAuthClientFactory.java │ │ │ ├── IConfidentialAuthClient.java │ │ │ ├── IConfidentialAuthClientFactory.java │ │ │ ├── IPublicAuthClient.java │ │ │ ├── IPublicAuthClientFactory.java │ │ │ └── PublicAuthClientFactory.java │ │ ├── common │ │ │ ├── CertificateCredential.java │ │ │ ├── ClientAssertion.java │ │ │ ├── ClientCertificateMetadata.java │ │ │ ├── KeyStoreConfiguration.java │ │ │ └── MicrosoftClientAssertion.java │ │ └── msal4j │ │ │ ├── Msal4jAuthClient.java │ │ │ └── Msal4jAuthenticationResult.java │ │ ├── client │ │ ├── ILabAccount.java │ │ ├── ILabClient.java │ │ ├── LabAccount.java │ │ ├── LabClient.java │ │ ├── LabGuestAccount.java │ │ └── LabQuery.java │ │ ├── constants │ │ ├── AltIdSource.java │ │ ├── AltIdType.java │ │ ├── AppType.java │ │ ├── AzureEnvironment.java │ │ ├── B2CProvider.java │ │ ├── FederationProvider.java │ │ ├── GuestHomeAzureEnvironment.java │ │ ├── GuestHomedIn.java │ │ ├── HasAltId.java │ │ ├── HomeDomain.java │ │ ├── HomeUpn.java │ │ ├── IsAdminConsented.java │ │ ├── LabConstants.java │ │ ├── Mfa.java │ │ ├── PasswordPolicyNotificationDays.java │ │ ├── PasswordPolicyValidityPeriod.java │ │ ├── ProtectionPolicy.java │ │ ├── PublicClient.java │ │ ├── ResetOperation.java │ │ ├── SignInAudience.java │ │ ├── TempUserType.java │ │ ├── TokenLifetime.java │ │ ├── TokenLifetimePolicy.java │ │ ├── TokenType.java │ │ ├── UserRole.java │ │ └── UserType.java │ │ ├── exception │ │ ├── LabApiException.java │ │ └── LabError.java │ │ └── jwt │ │ ├── IJWTParser.java │ │ ├── IJWTParserFactory.java │ │ ├── JWTParserFactory.java │ │ └── NimbusJWTParser.java │ └── test │ └── com │ └── microsoft │ └── identity │ └── labapi │ ├── utilities │ ├── authentication │ │ ├── KeyVaultAuthenticationClientTest.java │ │ ├── LabApiAuthenticationClientTest.java │ │ ├── PublicAuthClientRopcTest.java │ │ └── TokenParametersTest.java │ ├── client │ │ ├── LabClientTest.java │ │ └── LabGuestAccountTest.java │ └── rules │ │ └── RetryTestRule.java │ └── utilties │ └── authentication │ └── common │ ├── CertificateCredentialTest.java │ └── MicrosoftClientAssertionTest.java ├── README.md ├── azure-pipelines ├── auth-client │ └── common-instrumented-tests.yml ├── code-coverage │ └── common.yml ├── continuous-delivery │ └── common-cd.yml ├── pull-request-validation │ ├── build-consumers.yml │ ├── common.yml │ ├── common4j.yml │ ├── lab-utilities.yml │ └── security-compliance-check-common.yml ├── templates │ └── steps │ │ ├── automation-cert.yml │ │ ├── continuous-delivery │ │ └── assemble-publish-projversion.yml │ │ ├── fetch-pr-labels.yml │ │ ├── generate-sbom.yml │ │ ├── security-compliance-check.yml │ │ ├── spotbugs.yml │ │ ├── ui-automation │ │ └── gcloud.yml │ │ ├── vsts-release.yml │ │ └── vsts-release │ │ └── vsts-release-template.yml └── vsts-releases │ ├── common.yml │ └── common4j.yml ├── build.gradle ├── changelog.txt ├── common-java-root ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── common ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── microsoft │ │ │ └── identity │ │ │ └── common │ │ │ ├── CommandDispatcherTest.java │ │ │ ├── DefaultSharedPrefsFileManagerReencrypterTest.java │ │ │ ├── MockUtil.java │ │ │ ├── SharedPreferencesBrokerApplicationMetadataCacheTest.java │ │ │ ├── SharedPreferencesFileManagerTests.java │ │ │ ├── Util.java │ │ │ ├── adal │ │ │ └── internal │ │ │ │ ├── AndroidSecretKeyEnabledHelper.java │ │ │ │ ├── AndroidTestHelper.java │ │ │ │ ├── ReflectionUtils.java │ │ │ │ └── util │ │ │ │ ├── HashMapExtensionTests.java │ │ │ │ └── StringExtensionTests.java │ │ │ ├── crypto │ │ │ └── AndroidWrappedKeyLoaderTest.java │ │ │ └── internal │ │ │ ├── broker │ │ │ └── SDMBroadcastReceiverTests.java │ │ │ ├── dto │ │ │ └── AccessTokenRecordTest.java │ │ │ └── platform │ │ │ ├── AndroidDevicePoPManagerEncryptionTests.java │ │ │ ├── AndroidDevicePoPManagerSigningTests.java │ │ │ ├── AndroidDevicePoPManagerTests.java │ │ │ ├── AndroidKeyStoreAccessorTests.java │ │ │ ├── AsymmetricRsaKeyFactoryTests.java │ │ │ ├── AsymmetricRsaKeyTests.java │ │ │ └── RawKeyAccessorTest.java │ ├── res │ │ ├── drawable-hdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-ldpi │ │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ │ └── ic_launcher.png │ │ ├── values-de │ │ │ └── strings.xml │ │ └── values │ │ │ └── strings.xml │ └── resources │ │ └── jacoco-agent.properties │ ├── main │ ├── AndroidManifest.xml │ ├── aidl │ │ └── com │ │ │ └── microsoft │ │ │ ├── aad │ │ │ └── adal │ │ │ │ └── IBrokerAccountService.aidl │ │ │ └── identity │ │ │ └── client │ │ │ └── IMicrosoftAuthService.aidl │ ├── java │ │ └── com │ │ │ └── microsoft │ │ │ └── identity │ │ │ └── common │ │ │ ├── PropertyBagUtil.java │ │ │ ├── SharedPreferenceStringStorage.java │ │ │ ├── adal │ │ │ ├── internal │ │ │ │ ├── ADALError.java │ │ │ │ ├── AuthenticationConstants.java │ │ │ │ ├── AuthenticationSettings.java │ │ │ │ ├── PowerManagerWrapper.java │ │ │ │ ├── UsageStatsManagerWrapper.java │ │ │ │ ├── cache │ │ │ │ │ ├── ADALOAuth2TokenCache.java │ │ │ │ │ └── IStorageHelper.java │ │ │ │ ├── net │ │ │ │ │ ├── DefaultConnectionService.java │ │ │ │ │ ├── HttpUrlConnectionFactory.java │ │ │ │ │ ├── HttpWebRequest.java │ │ │ │ │ ├── HttpWebResponse.java │ │ │ │ │ ├── IConnectionService.java │ │ │ │ │ ├── IWebRequestHandler.java │ │ │ │ │ └── WebRequestHandler.java │ │ │ │ ├── tokensharing │ │ │ │ │ ├── ITokenShareInternal.java │ │ │ │ │ ├── ITokenShareResultInternal.java │ │ │ │ │ ├── TokenCacheItemSerializationAdapater.java │ │ │ │ │ ├── TokenShareResultInternal.java │ │ │ │ │ └── TokenShareUtility.java │ │ │ │ └── util │ │ │ │ │ ├── ExceptionExtensions.java │ │ │ │ │ ├── HashMapExtensions.java │ │ │ │ │ ├── JsonExtensions.java │ │ │ │ │ └── StringExtensions.java │ │ │ └── tokensharing │ │ │ │ └── SSOStateSerializer.java │ │ │ ├── base64 │ │ │ └── AndroidBase64.kt │ │ │ ├── components │ │ │ ├── AndroidClockSkewManager.java │ │ │ ├── AndroidPlatformComponentsFactory.java │ │ │ ├── AndroidPopManagerSupplier.java │ │ │ └── AndroidStorageSupplier.kt │ │ │ ├── crypto │ │ │ ├── AndroidAuthSdkStorageEncryptionManager.java │ │ │ └── AndroidWrappedKeyLoader.java │ │ │ ├── exception │ │ │ └── BrokerCommunicationException.kt │ │ │ ├── internal │ │ │ ├── activebrokerdiscovery │ │ │ │ ├── AccountManagerBrokerDiscoveryUtil.kt │ │ │ │ ├── BrokerDiscoveryClient.kt │ │ │ │ ├── BrokerDiscoveryClientFactory.kt │ │ │ │ ├── IBrokerDiscoveryClient.kt │ │ │ │ └── LegacyBrokerDiscoveryClient.kt │ │ │ ├── authorities │ │ │ │ ├── AzureActiveDirectoryAudienceDeserializer.java │ │ │ │ └── UnknownAudience.java │ │ │ ├── broker │ │ │ │ ├── AccountManagerBrokerAccount.java │ │ │ │ ├── AuthUxJavaScriptInterface.kt │ │ │ │ ├── AuthUxJsonPayload.kt │ │ │ │ ├── BoundServiceClient.java │ │ │ │ ├── BoundServiceConnection.java │ │ │ │ ├── BrokerActivity.java │ │ │ │ ├── BrokerData.kt │ │ │ │ ├── BrokerRequest.java │ │ │ │ ├── BrokerResult.java │ │ │ │ ├── BrokerValidator.kt │ │ │ │ ├── IBrokerValidator.kt │ │ │ │ ├── IInstallCertCallback.java │ │ │ │ ├── IRestrictionsManager.kt │ │ │ │ ├── InstallCertActivityLauncher.java │ │ │ │ ├── IntuneMAMEnrollmentIdGateway.java │ │ │ │ ├── MicrosoftAuthClient.java │ │ │ │ ├── PackageHelper.java │ │ │ │ ├── SDMBroadcastReceiver.java │ │ │ │ ├── SdmQrPinManager.kt │ │ │ │ └── ipc │ │ │ │ │ ├── AbstractIpcStrategyWithServiceValidation.kt │ │ │ │ │ ├── AccountManagerAddAccountStrategy.java │ │ │ │ │ ├── AccountManagerBackupIpcStrategyTargetingSpecificBrokerApp.kt │ │ │ │ │ ├── BoundServiceStrategy.java │ │ │ │ │ ├── BrokerOperationBundle.java │ │ │ │ │ ├── ContentProviderStatusLoader.kt │ │ │ │ │ ├── ContentProviderStrategy.java │ │ │ │ │ ├── IContentProviderStatusLoader.kt │ │ │ │ │ ├── IIpcStrategy.kt │ │ │ │ │ └── IpcStrategyWithBackup.kt │ │ │ ├── cache │ │ │ │ ├── ActiveBrokerCacheUpdater.kt │ │ │ │ ├── BaseActiveBrokerCache.kt │ │ │ │ ├── ClientActiveBrokerCache.kt │ │ │ │ ├── DefaultMultiTypeNameValueStorageReencrypter.java │ │ │ │ ├── HelloCache.kt │ │ │ │ ├── HelloCacheResult.kt │ │ │ │ ├── IActiveBrokerCache.kt │ │ │ │ ├── IClientActiveBrokerCache.kt │ │ │ │ ├── IMultiTypeNameValueStorageReencrypter.java │ │ │ │ ├── SharedPreferencesFileManager.java │ │ │ │ └── SharedPreferencesSimpleCacheImpl.java │ │ │ ├── commands │ │ │ │ ├── Command.java │ │ │ │ ├── GenerateShrCommand.java │ │ │ │ ├── GetCurrentAccountCommand.java │ │ │ │ ├── GetDeviceModeCommand.java │ │ │ │ ├── GetPreferredAuthMethodFromAuthenticator.kt │ │ │ │ ├── LoadAccountCommand.java │ │ │ │ ├── RefreshOnCallback.java │ │ │ │ ├── RefreshOnCommand.java │ │ │ │ ├── RemoveAccountCommand.java │ │ │ │ ├── RemoveCurrentAccountCommand.java │ │ │ │ └── parameters │ │ │ │ │ └── AndroidInteractiveTokenCommandParameters.java │ │ │ ├── controllers │ │ │ │ ├── BrokerMsalController.java │ │ │ │ ├── BrokerOperationExecutor.java │ │ │ │ └── LocalMSALController.java │ │ │ ├── fido │ │ │ │ ├── AuthFidoChallengeHandler.kt │ │ │ │ ├── CredManFidoManager.kt │ │ │ │ ├── FidoChallenge.kt │ │ │ │ ├── FidoChallengeField.kt │ │ │ │ ├── FidoRequestField.kt │ │ │ │ ├── IFidoManager.kt │ │ │ │ ├── LegacyFido2ApiException.java │ │ │ │ ├── LegacyFido2ApiManager.kt │ │ │ │ ├── LegacyFido2ApiObject.kt │ │ │ │ ├── LegacyFidoActivityResultContract.kt │ │ │ │ ├── PublicKeyCredentialDescriptor.java │ │ │ │ ├── PublicKeyCredentialRequestOptions.java │ │ │ │ └── WebAuthnJsonUtil.kt │ │ │ ├── logging │ │ │ │ ├── DiagnosticContext.java │ │ │ │ ├── ILoggerCallback.java │ │ │ │ ├── IRequestContext.java │ │ │ │ ├── Logger.java │ │ │ │ └── RequestContext.java │ │ │ ├── migration │ │ │ │ ├── AdalMigrationAdapter.java │ │ │ │ ├── IMigrationAdapter.java │ │ │ │ ├── TokenCacheItemMigrationAdapter.java │ │ │ │ ├── TokenMigrationCallback.java │ │ │ │ └── TokenMigrationUtility.java │ │ │ ├── msafederation │ │ │ │ ├── IMsaFederatedSignInProvider.kt │ │ │ │ ├── MsaFederatedCredential.kt │ │ │ │ ├── MsaFederatedSignInParameters.kt │ │ │ │ ├── MsaFederatedSignInProviderFactory.kt │ │ │ │ ├── MsaFederatedSignInProviderName.kt │ │ │ │ ├── MsaFederationConstants.kt │ │ │ │ ├── MsaFederationExtensions.kt │ │ │ │ └── google │ │ │ │ │ ├── GoogleSignInProvider.kt │ │ │ │ │ ├── SignInWithGoogleApi.kt │ │ │ │ │ ├── SignInWithGoogleCredential.kt │ │ │ │ │ └── SignInWithGoogleParameters.kt │ │ │ ├── net │ │ │ │ └── cache │ │ │ │ │ └── HttpCache.java │ │ │ ├── numberMatch │ │ │ │ └── NumberMatchHelper.kt │ │ │ ├── platform │ │ │ │ ├── AndroidBroadcaster.java │ │ │ │ ├── AndroidDeviceKeyManager.java │ │ │ │ ├── AndroidDeviceMetadata.java │ │ │ │ ├── AndroidDevicePopManager.java │ │ │ │ ├── AndroidKeyStoreAccessor.java │ │ │ │ ├── AndroidKeystoreAsymmetricRsaKey.java │ │ │ │ ├── AndroidKeystoreAsymmetricRsaKeyFactory.java │ │ │ │ ├── AndroidPlatformUtil.java │ │ │ │ ├── AndroidSecretKeyAccessor.java │ │ │ │ ├── AsymmetricCipher.java │ │ │ │ ├── AsymmetricKey.java │ │ │ │ ├── AsymmetricKeyAccessor.java │ │ │ │ ├── AsymmetricKeyFactory.java │ │ │ │ ├── AsymmetricRsaKey.java │ │ │ │ ├── AsymmetricRsaKeyFactory.java │ │ │ │ ├── IManagedKeyAccessor.java │ │ │ │ ├── Key.java │ │ │ │ ├── SymmetricCipher.java │ │ │ │ └── SymmetricKey.java │ │ │ ├── providers │ │ │ │ ├── microsoft │ │ │ │ │ ├── activedirectoryfederationservices │ │ │ │ │ │ ├── ActiveDirectoryFederationServices2012R2.java │ │ │ │ │ │ ├── ActiveDirectoryFederationServices2012R2Account.java │ │ │ │ │ │ ├── ActiveDirectoryFederationServices2012R2OAuth2Strategy.java │ │ │ │ │ │ ├── ActiveDirectoryFederationServices2016.java │ │ │ │ │ │ ├── ActiveDirectoryFederationServices2016Account.java │ │ │ │ │ │ ├── ActiveDirectoryFederationServices2016OAuth2Strategy.java │ │ │ │ │ │ ├── ActiveDirectoryFederationServicesAuthorizationRequest.java │ │ │ │ │ │ ├── ActiveDirectoryFederationServicesIdToken.java │ │ │ │ │ │ └── ActiveDirectoryFederationServicesTokenResponse.java │ │ │ │ │ └── azureactivedirectoryb2c │ │ │ │ │ │ ├── AzureActiveDirectoryB2C.java │ │ │ │ │ │ ├── AzureActiveDirectoryB2CAccount.java │ │ │ │ │ │ ├── AzureActiveDirectoryB2CAuthorizationRequest.java │ │ │ │ │ │ ├── AzureActiveDirectoryB2CIdToken.java │ │ │ │ │ │ ├── AzureActiveDirectoryB2COAuth2Strategy.java │ │ │ │ │ │ └── AzureActiveDirectoryB2CTokenResponse.java │ │ │ │ └── oauth2 │ │ │ │ │ ├── AndroidAuthorizationStrategy.java │ │ │ │ │ ├── AndroidTaskStateGenerator.java │ │ │ │ │ ├── AuthorizationActivity.java │ │ │ │ │ ├── AuthorizationActivityFactory.kt │ │ │ │ │ ├── AuthorizationActivityParameters.kt │ │ │ │ │ ├── AuthorizationFragment.java │ │ │ │ │ ├── BrokerAuthorizationActivity.java │ │ │ │ │ ├── BrowserAuthorizationFragment.java │ │ │ │ │ ├── CameraPermissionRequestHandler.kt │ │ │ │ │ ├── CurrentTaskAuthorizationActivity.java │ │ │ │ │ ├── CurrentTaskBrowserAuthorizationFragment.java │ │ │ │ │ ├── ResponseType.java │ │ │ │ │ └── WebViewAuthorizationFragment.java │ │ │ ├── request │ │ │ │ ├── AuthenticationSchemeTypeAdapter.java │ │ │ │ ├── IBrokerRequestAdapter.java │ │ │ │ └── MsalBrokerRequestAdapter.java │ │ │ ├── result │ │ │ │ ├── AdalBrokerResultAdapter.java │ │ │ │ ├── BrokerResultAdapterFactory.java │ │ │ │ ├── IBrokerResultAdapter.java │ │ │ │ └── MsalBrokerResultAdapter.java │ │ │ ├── telemetry │ │ │ │ ├── AndroidTelemetryContext.java │ │ │ │ ├── AndroidTelemetryPropertiesCache.java │ │ │ │ ├── Telemetry.java │ │ │ │ ├── TelemetryConfiguration.java │ │ │ │ ├── TelemetryEventStrings.java │ │ │ │ ├── events │ │ │ │ │ ├── ApiEndEvent.java │ │ │ │ │ ├── ApiStartEvent.java │ │ │ │ │ ├── BrokerEndEvent.java │ │ │ │ │ ├── BrokerStartEvent.java │ │ │ │ │ ├── UiEndEvent.java │ │ │ │ │ └── UiStartEvent.java │ │ │ │ └── observers │ │ │ │ │ ├── ITelemetryAggregatedObserver.java │ │ │ │ │ ├── ITelemetryDefaultObserver.java │ │ │ │ │ └── ITelemetryObserver.java │ │ │ ├── ui │ │ │ │ ├── AndroidAuthorizationStrategyFactory.java │ │ │ │ ├── CurrentTaskBrowserAuthorizationStrategy.java │ │ │ │ ├── DualScreenActivity.java │ │ │ │ ├── browser │ │ │ │ │ ├── AndroidBrowserSelector.java │ │ │ │ │ ├── BrowserAuthorizationStrategy.java │ │ │ │ │ ├── CustomTabsManager.java │ │ │ │ │ └── DefaultBrowserAuthorizationStrategy.java │ │ │ │ └── webview │ │ │ │ │ ├── AzureActiveDirectoryWebViewClient.java │ │ │ │ │ ├── EmbeddedWebViewAuthorizationStrategy.java │ │ │ │ │ ├── ExpectedPage.java │ │ │ │ │ ├── ISendResultCallback.java │ │ │ │ │ ├── OAuth2WebViewClient.java │ │ │ │ │ ├── OnPageLoadedCallback.java │ │ │ │ │ ├── ProcessUtil.java │ │ │ │ │ ├── WebViewUtil.java │ │ │ │ │ ├── certbasedauth │ │ │ │ │ ├── AbstractCertBasedAuthChallengeHandler.java │ │ │ │ │ ├── AbstractNfcSmartcardCertBasedAuthManager.java │ │ │ │ │ ├── AbstractSmartcardCertBasedAuthChallengeHandler.java │ │ │ │ │ ├── AbstractSmartcardCertBasedAuthManager.java │ │ │ │ │ ├── AbstractUsbSmartcardCertBasedAuthManager.java │ │ │ │ │ ├── CertBasedAuthFactory.java │ │ │ │ │ ├── DialogHolder.java │ │ │ │ │ ├── ICancelCbaCallback.java │ │ │ │ │ ├── ICertDetails.java │ │ │ │ │ ├── IConnectionCallback.java │ │ │ │ │ ├── IDialogHolder.java │ │ │ │ │ ├── IDisconnectionCallback.java │ │ │ │ │ ├── IDismissCallback.java │ │ │ │ │ ├── ISmartcardSession.java │ │ │ │ │ ├── NfcSmartcardCertBasedAuthChallengeHandler.java │ │ │ │ │ ├── OnDeviceCertBasedAuthChallengeHandler.java │ │ │ │ │ ├── SmartcardCertBasedAuthManagerFactory.java │ │ │ │ │ ├── SmartcardCertPickerDialog.java │ │ │ │ │ ├── SmartcardDialog.java │ │ │ │ │ ├── SmartcardErrorDialog.java │ │ │ │ │ ├── SmartcardNfcLoadingDialog.java │ │ │ │ │ ├── SmartcardNfcPromptDialog.java │ │ │ │ │ ├── SmartcardNfcReminderDialog.java │ │ │ │ │ ├── SmartcardPinDialog.java │ │ │ │ │ ├── SmartcardPromptDialog.java │ │ │ │ │ ├── SmartcardRemovalPromptDialog.java │ │ │ │ │ ├── UsbSmartcardCertBasedAuthChallengeHandler.java │ │ │ │ │ ├── UserChoiceDialog.java │ │ │ │ │ ├── YubiKeyPivProviderManager.java │ │ │ │ │ ├── YubiKitCertDetails.java │ │ │ │ │ ├── YubiKitNfcSmartcardCertBasedAuthManager.java │ │ │ │ │ ├── YubiKitSmartcardSession.java │ │ │ │ │ └── YubiKitUsbSmartcardCertBasedAuthManager.java │ │ │ │ │ ├── challengehandlers │ │ │ │ │ ├── ChallengeFactory.java │ │ │ │ │ ├── CrossCloudChallengeHandler.kt │ │ │ │ │ ├── IChallengeHandler.java │ │ │ │ │ ├── NonceRedirectHandler.kt │ │ │ │ │ ├── NtlmChallenge.java │ │ │ │ │ ├── NtlmChallengeHandler.java │ │ │ │ │ ├── PKeyAuthChallengeHandler.java │ │ │ │ │ ├── SwitchBrowserChallenge.kt │ │ │ │ │ └── SwitchBrowserRequestHandler.kt │ │ │ │ │ └── switchbrowser │ │ │ │ │ ├── SwitchBrowserProtocolCoordinator.kt │ │ │ │ │ └── SwitchBrowserUriHelper.kt │ │ │ └── util │ │ │ │ ├── AbstractSharedPrefNameValueStorage.java │ │ │ │ ├── AccountManagerUtil.java │ │ │ │ ├── AndroidKeyStoreUtil.java │ │ │ │ ├── CommonMoshiJsonAdapter.java │ │ │ │ ├── EncodingUtil.java │ │ │ │ ├── FindBugsConstants.java │ │ │ │ ├── GzipUtil.java │ │ │ │ ├── ICacheRecordGsonAdapter.java │ │ │ │ ├── NumberUtil.java │ │ │ │ ├── PackageUtils.java │ │ │ │ ├── ParcelableUtil.java │ │ │ │ ├── ProcessUtil.java │ │ │ │ ├── SharedPrefStringNameValueStorage.java │ │ │ │ ├── SharedPreferenceLongStorage.java │ │ │ │ ├── StringUtil.java │ │ │ │ ├── TriFunction.java │ │ │ │ └── WorkProfileUtil.java │ │ │ ├── logging │ │ │ ├── DiagnosticContext.java │ │ │ ├── ILoggerCallback.java │ │ │ └── Logger.java │ │ │ ├── migration │ │ │ ├── DefaultMultiTypeNameValueStorageReencrypter.java │ │ │ ├── IMigrationOperationResult.java │ │ │ ├── IMultiTypeNameValueStorageReencrypter.java │ │ │ └── MigrationOperationResult.java │ │ │ ├── nativeauth │ │ │ └── internal │ │ │ │ ├── commands │ │ │ │ ├── BaseNativeAuthCommand.kt │ │ │ │ ├── GetAuthMethodsCommand.kt │ │ │ │ ├── JITChallengeAuthMethodCommand.kt │ │ │ │ ├── JITSubmitChallengeCommand.kt │ │ │ │ ├── MFAChallengeCommand.kt │ │ │ │ ├── MFASubmitChallengeCommand.kt │ │ │ │ ├── ResetPasswordResendCodeCommand.kt │ │ │ │ ├── ResetPasswordStartCommand.kt │ │ │ │ ├── ResetPasswordSubmitCodeCommand.kt │ │ │ │ ├── ResetPasswordSubmitNewPasswordCommand.kt │ │ │ │ ├── SignInResendCodeCommand.kt │ │ │ │ ├── SignInStartCommand.kt │ │ │ │ ├── SignInSubmitCodeCommand.kt │ │ │ │ ├── SignInSubmitPasswordCommand.kt │ │ │ │ ├── SignInWithContinuationTokenCommand.kt │ │ │ │ ├── SignUpResendCodeCommand.kt │ │ │ │ ├── SignUpStartCommand.kt │ │ │ │ ├── SignUpSubmitCodeCommand.kt │ │ │ │ ├── SignUpSubmitPasswordCommand.kt │ │ │ │ └── SignUpSubmitUserAttributesCommand.kt │ │ │ │ ├── controllers │ │ │ │ ├── BaseNativeAuthController.kt │ │ │ │ └── NativeAuthMsalController.kt │ │ │ │ └── util │ │ │ │ └── CommandUtil.java │ │ │ └── sharedwithoneauth │ │ │ └── OneAuthSharedFunctions.kt │ └── res │ │ ├── drawable │ │ └── cursor_color.xml │ │ ├── layout │ │ ├── certificate_row_layout.xml │ │ ├── common_activity_authentication.xml │ │ ├── dual_screen_layout.xml │ │ ├── http_auth_dialog.xml │ │ ├── nfc_loading_layout.xml │ │ └── pin_textview_layout.xml │ │ ├── values-ar │ │ └── strings.xml │ │ ├── values-b+sr+Latn │ │ └── strings.xml │ │ ├── values-bg │ │ └── strings.xml │ │ ├── values-ca │ │ └── strings.xml │ │ ├── values-cs │ │ └── strings.xml │ │ ├── values-da │ │ └── strings.xml │ │ ├── values-de │ │ └── strings.xml │ │ ├── values-el │ │ └── strings.xml │ │ ├── values-es │ │ └── strings.xml │ │ ├── values-et │ │ └── strings.xml │ │ ├── values-eu │ │ └── strings.xml │ │ ├── values-fi │ │ └── strings.xml │ │ ├── values-fr │ │ └── strings.xml │ │ ├── values-gl │ │ └── strings.xml │ │ ├── values-he │ │ └── strings.xml │ │ ├── values-hi │ │ └── strings.xml │ │ ├── values-hr │ │ └── strings.xml │ │ ├── values-hu │ │ └── strings.xml │ │ ├── values-in │ │ └── strings.xml │ │ ├── values-it │ │ └── strings.xml │ │ ├── values-iw │ │ └── strings.xml │ │ ├── values-ja │ │ └── strings.xml │ │ ├── values-kk │ │ └── strings.xml │ │ ├── values-ko │ │ └── strings.xml │ │ ├── values-lt │ │ └── strings.xml │ │ ├── values-lv │ │ └── strings.xml │ │ ├── values-ms │ │ └── strings.xml │ │ ├── values-nb │ │ └── strings.xml │ │ ├── values-nl │ │ └── strings.xml │ │ ├── values-pl │ │ └── strings.xml │ │ ├── values-pt-rBR │ │ └── strings.xml │ │ ├── values-pt-rPT │ │ └── strings.xml │ │ ├── values-ro │ │ └── strings.xml │ │ ├── values-ru │ │ └── strings.xml │ │ ├── values-sk │ │ └── strings.xml │ │ ├── values-sl │ │ └── strings.xml │ │ ├── values-sr │ │ └── strings.xml │ │ ├── values-sv │ │ └── strings.xml │ │ ├── values-th │ │ └── strings.xml │ │ ├── values-tr │ │ └── strings.xml │ │ ├── values-uk │ │ └── strings.xml │ │ ├── values-vi │ │ └── strings.xml │ │ ├── values-zh-rCN │ │ └── strings.xml │ │ ├── values-zh-rTW │ │ └── strings.xml │ │ └── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── microsoft │ └── identity │ └── common │ ├── BrokerOAuth2TokenCacheTest.java │ ├── BuildConfigTest.kt │ ├── CacheKeyValueDelegateTest.java │ ├── MicrosoftFamilyOAuth2TokenCacheTest.java │ ├── MicrosoftStsAccountCredentialAdapterTest.java │ ├── MsalCppOAuth2TokenCacheTest.java │ ├── MsalOAuth2TokenCacheTest.java │ ├── SharedPreferencesAccountCredentialCacheTest.java │ ├── SharedPreferencesAccountCredentialCacheWithMemoryCacheTest.java │ ├── adal │ └── internal │ │ ├── PowerManagerWrapperShadow.java │ │ └── net │ │ └── DefaultConnectionServiceTest.java │ ├── crypto │ ├── AndroidAuthSdkStorageEncryptionManagerTest.java │ └── MockData.java │ ├── integration │ └── ClientCredentialsGrant │ │ └── OAuth2 │ │ ├── AzureActiveDirectoryClientCredentialsGrantTest.java │ │ └── MicrosoftSTSClientCredentialsGrantTest.java │ ├── internal │ ├── AccountManagerBrokerDiscoveryUtilTests.kt │ ├── BrokerValidatorTest.kt │ ├── activebrokerdiscovery │ │ ├── AccountManagerBrokerDiscoveryUtilTests.kt │ │ ├── BrokerDiscoveryClientTests.kt │ │ └── InMemoryActiveBrokerCache.kt │ ├── authorities │ │ └── AzureActiveDirectoryAuthorityTests.java │ ├── broker │ │ ├── AccountManagerBrokerAccountTest.java │ │ ├── AuthUxJavaScriptInterfaceTest.kt │ │ ├── AuthUxJsonPayloadTest.kt │ │ ├── BrokerDataTest.kt │ │ └── ipc │ │ │ ├── AccountManagerBackupIpcStrategyTargetingSpecificBrokerAppTest.kt │ │ │ ├── AccountManagerBoundServiceTests.java │ │ │ ├── ContentProviderStatusLoaderTest.kt │ │ │ ├── ContentProviderStrategyTests.java │ │ │ └── IpcStrategyWithBackupTests.kt │ ├── brokeroperationexecutor │ │ └── BrokerOperationExecutorTests.java │ ├── cache │ │ ├── ActiveBrokerCacheTest.kt │ │ ├── ActiveBrokerCacheUpdaterTest.kt │ │ └── HelloCacheTests.java │ ├── commands │ │ ├── GenerateShrCommandTest.java │ │ └── parameters │ │ │ └── GenerateShrCommandParametersTest.java │ ├── controllers │ │ ├── BrokerMsalControllerTest.java │ │ └── LocalMsalControllerTest.java │ ├── fido │ │ ├── AuthFidoChallengeHandlerTest.kt │ │ ├── ExtendedTestWebView.kt │ │ ├── FidoChallengeFieldTest.kt │ │ ├── FidoChallengeTest.kt │ │ ├── LegacyFidoActivityResultContractTest.kt │ │ ├── TestFidoManager.kt │ │ └── WebAuthnJsonUtilTest.kt │ ├── ipc │ │ ├── AccountManagerAddAccountStrategyTest.java │ │ ├── IpcStrategyTests.java │ │ └── mock │ │ │ ├── ShadowAccountManagerAddAccountConnectionFailed.java │ │ │ ├── ShadowAccountManagerAddAccountWithSuccessResult.java │ │ │ ├── ShadowBoundServiceClientConnectionFailed.java │ │ │ ├── ShadowBoundServiceClientWithCurrentBroker.java │ │ │ ├── ShadowBoundServiceClientWithLegacyBroker.java │ │ │ ├── ShadowBoundServiceClientWithSuccessResult.java │ │ │ ├── ShadowContentResolverConnectionFailed.java │ │ │ └── ShadowContentResolverWithSuccessResult.java │ ├── migration │ │ └── AdalMigrationAdapterDeserializationTest.java │ ├── msafederation │ │ └── google │ │ │ ├── GoogleSignInProviderTest.kt │ │ │ ├── MockGoogleSignInProvider.kt │ │ │ ├── SignInWithGoogleApiTest.kt │ │ │ ├── SignInWithGoogleCredentialTest.kt │ │ │ └── SignInWithGoogleParametersTest.kt │ ├── numberMatch │ │ └── NumberMatchHelperTest.kt │ ├── platform │ │ └── AndroidPlatformUtilTest.java │ ├── providers │ │ ├── microsoft │ │ │ └── nativeauth │ │ │ │ └── integration │ │ │ │ ├── ResetPasswordOAuth2StrategyTest.kt │ │ │ │ ├── SignInOAuthStrategyTest.kt │ │ │ │ ├── SignUpOAuth2StrategyTest.kt │ │ │ │ └── scenario │ │ │ │ ├── ResetPasswordScenarioTest.kt │ │ │ │ └── SignUpScenarioTest.kt │ │ └── oauth2 │ │ │ ├── AndroidTaskStateGeneratorTest.java │ │ │ └── AuthorizationActivityFactoryTest.java │ ├── request │ │ ├── AuthenticationSchemeTypeAdapterTests.java │ │ ├── MsalBrokerRequestAdapterTests.java │ │ └── MsalBrokerResultAdapterTests.kt │ ├── telemetry │ │ └── AndroidTelemetryContextTest.java │ ├── ui │ │ ├── browser │ │ │ └── AndroidBrowserSelectorTest.java │ │ └── webview │ │ │ ├── AzureActiveDirectoryWebViewClientTest.java │ │ │ ├── certbasedauth │ │ │ ├── AbstractCertBasedAuthTest.java │ │ │ ├── AbstractSmartcardCertBasedAuthChallengeHandlerTest.java │ │ │ ├── CertBasedAuthFactoryTest.java │ │ │ ├── NfcSmartcardCertBasedAuthChallengeHandlerTest.java │ │ │ ├── OnDeviceCertBasedAuthChallengeHandlerTest.java │ │ │ ├── TestCertBasedAuthTelemetryHelper.java │ │ │ ├── TestClientCertRequest.java │ │ │ ├── TestDialog.java │ │ │ ├── TestDialogHolder.java │ │ │ ├── TestNfcSmartcardCertBasedAuthManager.java │ │ │ ├── TestSmartcardSession.java │ │ │ ├── TestUsbSmartcardCertBasedAuthManager.java │ │ │ └── UsbSmartcardCertBasedAuthChallengeHandlerTest.java │ │ │ ├── challengehandlers │ │ │ ├── CrossCloudChallengeHandlerTest.kt │ │ │ └── SwitchBrowserRequestHandlerTest.kt │ │ │ └── switchbrowser │ │ │ ├── SwitchBrowserProtocolCoordinatorTest.kt │ │ │ └── SwitchBrowserUriHelperTest.kt │ └── util │ │ ├── AndroidAuthorizationStrategyFactoryTest.kt │ │ ├── ArgumentCaptorUtils.kt │ │ └── PackageUtilTest.java │ ├── nativeauth │ ├── internal │ │ ├── controllers │ │ │ └── NativeAuthControllerTest.kt │ │ └── util │ │ │ └── CommandUtilTest.kt │ └── util │ │ └── CommandResultUtilTest.kt │ ├── shadows │ ├── ShadowAndroidSdkStorageEncryptionManager.java │ ├── ShadowCertBasedAuthTelemetryHelper.java │ └── ShadowKeyChain.java │ └── unit │ ├── AudienceDefaultCloudUrlTest.java │ ├── AudienceDefaultPreProductionCloudUrlTest.java │ ├── AuthenticationConstantsTest.java │ ├── AzureActiveDirectoryB2CAuthorityTest.java │ └── CertificateCredentialBuilder.java ├── common4j ├── .gitattributes ├── .gitignore ├── build.gradle ├── changes.md ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── settings.gradle ├── src │ ├── main │ │ ├── com │ │ │ └── microsoft │ │ │ │ └── identity │ │ │ │ └── common │ │ │ │ ├── adal │ │ │ │ └── internal │ │ │ │ │ └── cache │ │ │ │ │ └── ADALTokenCacheItem.java │ │ │ │ └── java │ │ │ │ ├── AuthenticationConstants.java │ │ │ │ ├── AuthenticationSettings.java │ │ │ │ ├── BaseAccount.java │ │ │ │ ├── WarningType.java │ │ │ │ ├── adal │ │ │ │ ├── ADALUserInfo.java │ │ │ │ └── cache │ │ │ │ │ ├── CacheKey.java │ │ │ │ │ └── DateTimeAdapter.java │ │ │ │ ├── authorities │ │ │ │ ├── AccountsInOneOrganization.java │ │ │ │ ├── ActiveDirectoryFederationServicesAuthority.java │ │ │ │ ├── AllAccounts.java │ │ │ │ ├── AnyOrganizationalAccount.java │ │ │ │ ├── AnyPersonalAccount.java │ │ │ │ ├── Authority.java │ │ │ │ ├── AuthorityDeserializer.java │ │ │ │ ├── AzureActiveDirectoryAudience.java │ │ │ │ ├── AzureActiveDirectoryAuthority.java │ │ │ │ ├── AzureActiveDirectoryB2CAuthority.java │ │ │ │ ├── CIAMAuthority.java │ │ │ │ ├── Environment.java │ │ │ │ └── UnknownAuthority.java │ │ │ │ ├── authscheme │ │ │ │ ├── AbstractAuthenticationScheme.java │ │ │ │ ├── AuthenticationSchemeFactory.java │ │ │ │ ├── BearerAuthenticationSchemeInternal.java │ │ │ │ ├── INameable.java │ │ │ │ ├── INonced.java │ │ │ │ ├── IPoPAuthenticationSchemeParams.java │ │ │ │ ├── ITokenAuthenticationSchemeInternal.java │ │ │ │ ├── PopAuthenticationSchemeInternal.java │ │ │ │ ├── PopAuthenticationSchemeWithClientKeyInternal.java │ │ │ │ └── TokenAuthenticationScheme.java │ │ │ │ ├── base64 │ │ │ │ ├── Base64Flags.kt │ │ │ │ ├── Base64Util.kt │ │ │ │ └── IBase64.kt │ │ │ │ ├── broker │ │ │ │ ├── BrokerAccountDataName.java │ │ │ │ ├── CommonRefreshTokenCredentialProvider.kt │ │ │ │ ├── IBrokerAccount.kt │ │ │ │ └── ICallValidator.java │ │ │ │ ├── browser │ │ │ │ ├── Browser.java │ │ │ │ ├── IBrowserSelector.java │ │ │ │ └── NoopBrowserSelector.java │ │ │ │ ├── cache │ │ │ │ ├── AbstractAccountCredentialCache.java │ │ │ │ ├── AbstractApplicationMetadata.java │ │ │ │ ├── AccountDeletionRecord.java │ │ │ │ ├── BrokerApplicationMetadata.java │ │ │ │ ├── BrokerOAuth2TokenCache.java │ │ │ │ ├── BrokerOAuth2TokenCacheTelemetryWrapper.java │ │ │ │ ├── CacheKeyValueDelegate.java │ │ │ │ ├── CacheRecord.java │ │ │ │ ├── HttpCache.java │ │ │ │ ├── IAccountCredentialAdapter.java │ │ │ │ ├── IAccountCredentialCache.java │ │ │ │ ├── IBrokerApplicationMetadataCache.java │ │ │ │ ├── ICacheKeyValueDelegate.java │ │ │ │ ├── ICacheRecord.java │ │ │ │ ├── IListTypeToken.java │ │ │ │ ├── IMultiTypeNameValueStorage.java │ │ │ │ ├── IShareSingleSignOnState.java │ │ │ │ ├── ISimpleCache.java │ │ │ │ ├── ITokenCacheItem.java │ │ │ │ ├── MapBackedPreferencesManager.java │ │ │ │ ├── MicrosoftFamilyOAuth2TokenCache.java │ │ │ │ ├── MicrosoftStsAccountCredentialAdapter.java │ │ │ │ ├── MsalCppOAuth2TokenCache.java │ │ │ │ ├── MsalOAuth2TokenCache.java │ │ │ │ ├── NameValueStorageBrokerApplicationMetadataCache.java │ │ │ │ ├── NameValueStorageFileManagerSimpleCacheImpl.java │ │ │ │ ├── SharedPreferencesAccountCredentialCache.java │ │ │ │ └── SharedPreferencesAccountCredentialCacheWithMemoryCache.java │ │ │ │ ├── challengehandlers │ │ │ │ ├── IDeviceCertificate.java │ │ │ │ ├── IDeviceCertificateLoader.java │ │ │ │ ├── PKeyAuthChallenge.java │ │ │ │ └── PKeyAuthChallengeFactory.java │ │ │ │ ├── commands │ │ │ │ ├── AcquirePrtSsoTokenResult.java │ │ │ │ ├── BaseCommand.java │ │ │ │ ├── CommandCallback.java │ │ │ │ ├── DeviceCodeFlowAuthResultCommand.java │ │ │ │ ├── DeviceCodeFlowCommand.java │ │ │ │ ├── DeviceCodeFlowCommandCallback.java │ │ │ │ ├── DeviceCodeFlowTokenResultCommand.java │ │ │ │ ├── EmptyCommandCallback.java │ │ │ │ ├── ICommand.java │ │ │ │ ├── ICommandResult.java │ │ │ │ ├── InteractiveTokenCommand.java │ │ │ │ ├── RopcTokenCommand.java │ │ │ │ ├── SilentTokenCommand.java │ │ │ │ ├── TokenCommand.java │ │ │ │ └── parameters │ │ │ │ │ ├── AcquirePrtSsoTokenCommandParameters.java │ │ │ │ │ ├── BrokerDeviceCodeFlowCommandParameters.java │ │ │ │ │ ├── BrokerInteractiveTokenCommandParameters.java │ │ │ │ │ ├── BrokerResourceAccountCommandParameters.java │ │ │ │ │ ├── BrokerRopcTokenCommandParameters.java │ │ │ │ │ ├── BrokerSilentTokenCommandParameters.java │ │ │ │ │ ├── CommandParameters.java │ │ │ │ │ ├── DeviceCodeFlowCommandParameters.java │ │ │ │ │ ├── GenerateShrCommandParameters.java │ │ │ │ │ ├── GetAadDeviceIdCommandParameters.java │ │ │ │ │ ├── IBrokerTokenCommandParameters.java │ │ │ │ │ ├── IHasExtraParameters.java │ │ │ │ │ ├── InteractiveTokenCommandParameters.java │ │ │ │ │ ├── RemoveAccountCommandParameters.java │ │ │ │ │ ├── ResourceAccountCommandParameters.java │ │ │ │ │ ├── RopcTokenCommandParameters.java │ │ │ │ │ ├── SilentTokenCommandParameters.java │ │ │ │ │ └── TokenCommandParameters.java │ │ │ │ ├── configuration │ │ │ │ └── LibraryConfiguration.java │ │ │ │ ├── constants │ │ │ │ ├── FidoConstants.kt │ │ │ │ ├── OAuth2ErrorCode.java │ │ │ │ ├── OAuth2SubErrorCode.java │ │ │ │ ├── SharedDeviceModeConstants.kt │ │ │ │ └── SpotbugsWarning.java │ │ │ │ ├── controllers │ │ │ │ ├── BaseController.java │ │ │ │ ├── CommandDispatcher.java │ │ │ │ ├── CommandResult.java │ │ │ │ ├── CommandResultCache.java │ │ │ │ ├── CommandResultCacheItem.java │ │ │ │ ├── ExceptionAdapter.java │ │ │ │ └── IControllerFactory.kt │ │ │ │ ├── crypto │ │ │ │ ├── Algorithm.java │ │ │ │ ├── AsymmetricAlgorithm.java │ │ │ │ ├── BasicDecryptor.java │ │ │ │ ├── BasicEncryptor.java │ │ │ │ ├── BasicHMacSigner.java │ │ │ │ ├── BasicSigner.java │ │ │ │ ├── CryptoSuite.java │ │ │ │ ├── DefaultCryptoFactory.kt │ │ │ │ ├── ICertificateGeneratorFunction.java │ │ │ │ ├── ICryptoFactory.kt │ │ │ │ ├── IDecryptor.java │ │ │ │ ├── IDevicePopManager.java │ │ │ │ ├── IEncryptor.java │ │ │ │ ├── IHMacSigner.java │ │ │ │ ├── IKeyAccessor.java │ │ │ │ ├── IKeyAccessorStringAdapter.kt │ │ │ │ ├── IKeyStoreKeyManager.java │ │ │ │ ├── ISigner.java │ │ │ │ ├── IVGenerator.java │ │ │ │ ├── KeyAccessorStringAdapter.kt │ │ │ │ ├── ProviderFactory.java │ │ │ │ ├── RawKeyAccessor.java │ │ │ │ ├── SP800108KeyGen.java │ │ │ │ ├── SecureHardwareState.java │ │ │ │ ├── SigningAlgorithm.java │ │ │ │ ├── StorageEncryptionManager.java │ │ │ │ ├── SymmetricAlgorithm.java │ │ │ │ └── key │ │ │ │ │ ├── AES256KeyLoader.java │ │ │ │ │ ├── AbstractSecretKeyLoader.java │ │ │ │ │ ├── KeyUtil.java │ │ │ │ │ └── PredefinedKeyLoader.java │ │ │ │ ├── dto │ │ │ │ ├── AadDeviceIdRecord.kt │ │ │ │ ├── AccessTokenRecord.java │ │ │ │ ├── AccountCredentialBase.java │ │ │ │ ├── AccountRecord.java │ │ │ │ ├── Credential.java │ │ │ │ ├── CredentialType.java │ │ │ │ ├── IAccountRecord.java │ │ │ │ ├── IRefreshTokenRecord.java │ │ │ │ ├── IdTokenRecord.java │ │ │ │ ├── PrimaryRefreshTokenRecord.java │ │ │ │ └── RefreshTokenRecord.java │ │ │ │ ├── eststelemetry │ │ │ │ ├── CurrentRequestTelemetry.java │ │ │ │ ├── EstsTelemetry.java │ │ │ │ ├── FailedRequest.java │ │ │ │ ├── ICurrentTelemetry.java │ │ │ │ ├── IRequestTelemetry.java │ │ │ │ ├── IRequestTelemetryCache.java │ │ │ │ ├── LastRequestTelemetry.java │ │ │ │ ├── LastRequestTelemetryCache.java │ │ │ │ ├── PublicApiId.java │ │ │ │ ├── RequestTelemetry.java │ │ │ │ ├── SchemaConstants.java │ │ │ │ └── TelemetryUtils.java │ │ │ │ ├── exception │ │ │ │ ├── ArgumentException.java │ │ │ │ ├── BaseException.java │ │ │ │ ├── ClientException.java │ │ │ │ ├── ConnectionError.kt │ │ │ │ ├── DeviceRegistrationRequiredException.java │ │ │ │ ├── ErrorStrings.java │ │ │ │ ├── IErrorInformation.java │ │ │ │ ├── InsufficientDeviceRegistrationException.java │ │ │ │ ├── IntuneAppProtectionPolicyRequiredException.java │ │ │ │ ├── IrrecoverableDcfException.java │ │ │ │ ├── ServiceException.java │ │ │ │ ├── StrongDeviceRegistrationRequiredException.java │ │ │ │ ├── TerminalException.java │ │ │ │ ├── UiRequiredException.java │ │ │ │ ├── UnsupportedBrokerException.java │ │ │ │ └── UserCancelException.java │ │ │ │ ├── flighting │ │ │ │ ├── CommonFlight.java │ │ │ │ ├── CommonFlightsManager.kt │ │ │ │ ├── IFlightConfig.java │ │ │ │ ├── IFlightsManager.kt │ │ │ │ └── IFlightsProvider.java │ │ │ │ ├── foci │ │ │ │ └── FociQueryUtilities.java │ │ │ │ ├── interfaces │ │ │ │ ├── AbstractPerSeparatorMultiTypeNameValueStorage.java │ │ │ │ ├── IHttpClientWrapper.java │ │ │ │ ├── INameValueStorage.java │ │ │ │ ├── IPerSeparatorMultiTypeNameValueStorage.java │ │ │ │ ├── IPlatformComponents.java │ │ │ │ ├── IPopManagerSupplier.java │ │ │ │ ├── IRefreshTokenCredentialProvider.kt │ │ │ │ ├── IStorageSupplier.kt │ │ │ │ └── PlatformComponents.java │ │ │ │ ├── jwt │ │ │ │ ├── AbstractJwtRequest.java │ │ │ │ ├── IJweResponseDecryptor.java │ │ │ │ ├── IJwtRequestSigner.java │ │ │ │ ├── JwtRequestBody.java │ │ │ │ ├── JwtRequestHeader.java │ │ │ │ └── JwtUtils.java │ │ │ │ ├── logging │ │ │ │ ├── DiagnosticContext.java │ │ │ │ ├── ILoggerCallback.java │ │ │ │ ├── IRequestContext.java │ │ │ │ ├── LibraryInfoHelper.java │ │ │ │ ├── LogSession.kt │ │ │ │ ├── Logger.java │ │ │ │ └── RequestContext.java │ │ │ │ ├── marker │ │ │ │ ├── CodeMarker.java │ │ │ │ ├── CodeMarkerManager.java │ │ │ │ └── PerfConstants.java │ │ │ │ ├── nativeauth │ │ │ │ ├── BuildValues.java │ │ │ │ ├── authorities │ │ │ │ │ └── NativeAuthCIAMAuthority.kt │ │ │ │ ├── commands │ │ │ │ │ └── parameters │ │ │ │ │ │ ├── AcquireTokenNoFixedScopesCommandParameters.java │ │ │ │ │ │ ├── BaseNativeAuthCommandParameters.java │ │ │ │ │ │ ├── BaseSignInTokenCommandParameters.java │ │ │ │ │ │ ├── GetAuthMethodsCommandParameters.java │ │ │ │ │ │ ├── JITChallengeAuthMethodCommandParameters.java │ │ │ │ │ │ ├── JITContinueCommandParameters.java │ │ │ │ │ │ ├── JITIntrospectCommandParameters.java │ │ │ │ │ │ ├── MFADefaultChallengeCommandParameters.java │ │ │ │ │ │ ├── MFASelectedDefaultChallengeCommandParameters.java │ │ │ │ │ │ ├── MFASubmitChallengeCommandParameters.java │ │ │ │ │ │ ├── ResetPasswordResendCodeCommandParameters.java │ │ │ │ │ │ ├── ResetPasswordStartCommandParameters.java │ │ │ │ │ │ ├── ResetPasswordSubmitCodeCommandParameters.java │ │ │ │ │ │ ├── ResetPasswordSubmitNewPasswordCommandParameters.java │ │ │ │ │ │ ├── SignInResendCodeCommandParameters.java │ │ │ │ │ │ ├── SignInStartCommandParameters.java │ │ │ │ │ │ ├── SignInSubmitCodeCommandParameters.java │ │ │ │ │ │ ├── SignInSubmitPasswordCommandParameters.java │ │ │ │ │ │ ├── SignInWithContinuationTokenCommandParameters.java │ │ │ │ │ │ ├── SignUpContinueCommandParameters.java │ │ │ │ │ │ ├── SignUpResendCodeCommandParameters.java │ │ │ │ │ │ ├── SignUpStartCommandParameters.java │ │ │ │ │ │ ├── SignUpSubmitCodeCommandParameters.java │ │ │ │ │ │ ├── SignUpSubmitPasswordCommandParameters.java │ │ │ │ │ │ └── SignUpSubmitUserAttributesCommandParameters.java │ │ │ │ ├── controllers │ │ │ │ │ └── results │ │ │ │ │ │ ├── INativeAuthCommandResult.kt │ │ │ │ │ │ ├── JITCommandResult.kt │ │ │ │ │ │ ├── MFACommandResult.kt │ │ │ │ │ │ ├── ResetPasswordCommandResult.kt │ │ │ │ │ │ ├── SignInCommandResult.kt │ │ │ │ │ │ └── SignUpCommandResult.kt │ │ │ │ ├── providers │ │ │ │ │ ├── IApiResponse.kt │ │ │ │ │ ├── NativeAuthConstants.kt │ │ │ │ │ ├── NativeAuthOAuth2Configuration.kt │ │ │ │ │ ├── NativeAuthOAuth2Strategy.kt │ │ │ │ │ ├── NativeAuthOAuth2StrategyFactory.kt │ │ │ │ │ ├── NativeAuthRequestProvider.kt │ │ │ │ │ ├── NativeAuthResponseHandler.kt │ │ │ │ │ ├── interactors │ │ │ │ │ │ ├── JITInteractor.kt │ │ │ │ │ │ ├── ResetPasswordInteractor.kt │ │ │ │ │ │ ├── SignInInteractor.kt │ │ │ │ │ │ └── SignUpInteractor.kt │ │ │ │ │ ├── requests │ │ │ │ │ │ ├── NativeAuthRequest.kt │ │ │ │ │ │ ├── jit │ │ │ │ │ │ │ ├── JITChallengeRequest.kt │ │ │ │ │ │ │ ├── JITContinueRequest.kt │ │ │ │ │ │ │ └── JITIntrospectRequest.kt │ │ │ │ │ │ ├── resetpassword │ │ │ │ │ │ │ ├── ResetPasswordChallengeRequest.kt │ │ │ │ │ │ │ ├── ResetPasswordContinueRequest.kt │ │ │ │ │ │ │ ├── ResetPasswordPollCompletionRequest.kt │ │ │ │ │ │ │ ├── ResetPasswordStartRequest.kt │ │ │ │ │ │ │ └── ResetPasswordSubmitRequest.kt │ │ │ │ │ │ ├── signin │ │ │ │ │ │ │ ├── SignInChallengeRequest.kt │ │ │ │ │ │ │ ├── SignInInitiateRequest.kt │ │ │ │ │ │ │ ├── SignInIntrospectRequest.kt │ │ │ │ │ │ │ └── SignInTokenRequest.kt │ │ │ │ │ │ └── signup │ │ │ │ │ │ │ ├── SignUpChallengeRequest.kt │ │ │ │ │ │ │ ├── SignUpContinueRequest.kt │ │ │ │ │ │ │ └── SignUpStartRequest.kt │ │ │ │ │ └── responses │ │ │ │ │ │ ├── ApiErrorResult.kt │ │ │ │ │ │ ├── ApiResult.kt │ │ │ │ │ │ ├── UserAttributeApiResult.kt │ │ │ │ │ │ ├── UserAttributeOptionsApiResult.kt │ │ │ │ │ │ ├── jit │ │ │ │ │ │ ├── JITChallengeApiResponse.kt │ │ │ │ │ │ ├── JITChallengeApiResult.kt │ │ │ │ │ │ ├── JITContinueApiResponse.kt │ │ │ │ │ │ ├── JITContinueApiResult.kt │ │ │ │ │ │ ├── JITIntrospectApiResponse.kt │ │ │ │ │ │ └── JITIntrospectApiResult.kt │ │ │ │ │ │ ├── resetpassword │ │ │ │ │ │ ├── ResetPasswordChallengeApiResponse.kt │ │ │ │ │ │ ├── ResetPasswordChallengeApiResult.kt │ │ │ │ │ │ ├── ResetPasswordContinueApiResponse.kt │ │ │ │ │ │ ├── ResetPasswordContinueApiResult.kt │ │ │ │ │ │ ├── ResetPasswordPollCompletionApiResponse.kt │ │ │ │ │ │ ├── ResetPasswordPollCompletionApiResult.kt │ │ │ │ │ │ ├── ResetPasswordStartApiResponse.kt │ │ │ │ │ │ ├── ResetPasswordStartApiResult.kt │ │ │ │ │ │ ├── ResetPasswordSubmitApiResponse.kt │ │ │ │ │ │ └── ResetPasswordSubmitApiResult.kt │ │ │ │ │ │ ├── signin │ │ │ │ │ │ ├── AuthenticationMethodApiResponse.kt │ │ │ │ │ │ ├── AuthenticationMethodApiResult.kt │ │ │ │ │ │ ├── SignInChallengeApiResponse.kt │ │ │ │ │ │ ├── SignInChallengeApiResult.kt │ │ │ │ │ │ ├── SignInInitiateApiResponse.kt │ │ │ │ │ │ ├── SignInInitiateApiResult.kt │ │ │ │ │ │ ├── SignInIntrospectApiResponse.kt │ │ │ │ │ │ ├── SignInIntrospectApiResult.kt │ │ │ │ │ │ ├── SignInTokenApiResponse.kt │ │ │ │ │ │ └── SignInTokenApiResult.kt │ │ │ │ │ │ └── signup │ │ │ │ │ │ ├── SignUpChallengeApiResponse.kt │ │ │ │ │ │ ├── SignUpChallengeApiResult.kt │ │ │ │ │ │ ├── SignUpContinueApiResponse.kt │ │ │ │ │ │ ├── SignUpContinueApiResult.kt │ │ │ │ │ │ ├── SignUpStartApiResponse.kt │ │ │ │ │ │ └── SignUpStartApiResult.kt │ │ │ │ └── util │ │ │ │ │ ├── ApiErrorResponseUtil.kt │ │ │ │ │ ├── ApiResultUtil.kt │ │ │ │ │ ├── CommandResultUtil.kt │ │ │ │ │ ├── ILoggable.kt │ │ │ │ │ └── ListUtils.kt │ │ │ │ ├── net │ │ │ │ ├── AbstractHttpClient.java │ │ │ │ ├── DefaultHttpClientWrapper.java │ │ │ │ ├── HttpClient.java │ │ │ │ ├── HttpConstants.java │ │ │ │ ├── HttpRequest.java │ │ │ │ ├── HttpResponse.java │ │ │ │ ├── HttpUrlConnectionFactory.java │ │ │ │ ├── IRetryPolicy.java │ │ │ │ ├── NoRetryPolicy.java │ │ │ │ ├── RetryFailedException.java │ │ │ │ ├── SSLSocketFactoryWrapper.java │ │ │ │ ├── StatusCodeAndExceptionRetry.java │ │ │ │ └── UrlConnectionHttpClient.java │ │ │ │ ├── opentelemetry │ │ │ │ ├── AttributeName.java │ │ │ │ ├── CertBasedAuthChoice.java │ │ │ │ ├── CertBasedAuthTelemetryHelper.java │ │ │ │ ├── CryptoFactoryName.java │ │ │ │ ├── CryptoFactoryTelemetryHelper.java │ │ │ │ ├── CryptoObjectName.java │ │ │ │ ├── ICertBasedAuthTelemetryHelper.java │ │ │ │ ├── ICryptoOperation.java │ │ │ │ ├── NoopSpan.java │ │ │ │ ├── NoopTraceFlags.java │ │ │ │ ├── NoopTraceState.java │ │ │ │ ├── NoopTraceStateBuilder.java │ │ │ │ ├── OTelUtility.java │ │ │ │ ├── OpenTelemetryHolder.java │ │ │ │ ├── OtelContextExtension.java │ │ │ │ ├── SerializableSpanContext.java │ │ │ │ ├── SpanExtension.java │ │ │ │ └── SpanName.java │ │ │ │ ├── platform │ │ │ │ ├── AbstractDeviceMetadata.java │ │ │ │ ├── AbstractDevicePopManager.java │ │ │ │ ├── AbstractKeyStoreKeyManager.java │ │ │ │ ├── Device.java │ │ │ │ ├── DevicePoPUtils.java │ │ │ │ ├── IDeviceMetadata.java │ │ │ │ └── JweResponse.java │ │ │ │ ├── providers │ │ │ │ ├── IdentityProvider.java │ │ │ │ ├── RawAuthorizationResult.java │ │ │ │ ├── microsoft │ │ │ │ │ ├── MicrosoftAccount.java │ │ │ │ │ ├── MicrosoftAuthorizationErrorResponse.java │ │ │ │ │ ├── MicrosoftAuthorizationRequest.java │ │ │ │ │ ├── MicrosoftAuthorizationResponse.java │ │ │ │ │ ├── MicrosoftAuthorizationResult.java │ │ │ │ │ ├── MicrosoftIdToken.java │ │ │ │ │ ├── MicrosoftRefreshToken.java │ │ │ │ │ ├── MicrosoftTokenErrorResponse.java │ │ │ │ │ ├── MicrosoftTokenRequest.java │ │ │ │ │ ├── MicrosoftTokenResponse.java │ │ │ │ │ ├── azureactivedirectory │ │ │ │ │ │ ├── AzureActiveDirectory.java │ │ │ │ │ │ ├── AzureActiveDirectoryAccessToken.java │ │ │ │ │ │ ├── AzureActiveDirectoryAccount.java │ │ │ │ │ │ ├── AzureActiveDirectoryAuthorizationErrorResponse.java │ │ │ │ │ │ ├── AzureActiveDirectoryAuthorizationRequest.java │ │ │ │ │ │ ├── AzureActiveDirectoryAuthorizationResponse.java │ │ │ │ │ │ ├── AzureActiveDirectoryAuthorizationResult.java │ │ │ │ │ │ ├── AzureActiveDirectoryAuthorizationResultFactory.java │ │ │ │ │ │ ├── AzureActiveDirectoryCloud.java │ │ │ │ │ │ ├── AzureActiveDirectoryEnvironment.java │ │ │ │ │ │ ├── AzureActiveDirectoryIdToken.java │ │ │ │ │ │ ├── AzureActiveDirectoryInstanceResponse.java │ │ │ │ │ │ ├── AzureActiveDirectoryOAuth2Configuration.java │ │ │ │ │ │ ├── AzureActiveDirectoryOAuth2Strategy.java │ │ │ │ │ │ ├── AzureActiveDirectoryPromptBehavior.java │ │ │ │ │ │ ├── AzureActiveDirectoryRefreshToken.java │ │ │ │ │ │ ├── AzureActiveDirectorySlice.java │ │ │ │ │ │ ├── AzureActiveDirectoryTokenRequest.java │ │ │ │ │ │ ├── AzureActiveDirectoryTokenResponse.java │ │ │ │ │ │ └── ClientInfo.java │ │ │ │ │ └── microsoftsts │ │ │ │ │ │ ├── AbstractMicrosoftStsTokenResponseHandler.java │ │ │ │ │ │ ├── MicrosoftSts.java │ │ │ │ │ │ ├── MicrosoftStsAccessToken.java │ │ │ │ │ │ ├── MicrosoftStsAccount.java │ │ │ │ │ │ ├── MicrosoftStsAuthorizationErrorResponse.java │ │ │ │ │ │ ├── MicrosoftStsAuthorizationRequest.java │ │ │ │ │ │ ├── MicrosoftStsAuthorizationResponse.java │ │ │ │ │ │ ├── MicrosoftStsAuthorizationResult.java │ │ │ │ │ │ ├── MicrosoftStsAuthorizationResultFactory.java │ │ │ │ │ │ ├── MicrosoftStsIdToken.java │ │ │ │ │ │ ├── MicrosoftStsOAuth2Configuration.java │ │ │ │ │ │ ├── MicrosoftStsOAuth2Strategy.java │ │ │ │ │ │ ├── MicrosoftStsPromptBehavior.java │ │ │ │ │ │ ├── MicrosoftStsRefreshToken.java │ │ │ │ │ │ ├── MicrosoftStsRopcTokenRequest.java │ │ │ │ │ │ ├── MicrosoftStsTokenRequest.java │ │ │ │ │ │ ├── MicrosoftStsTokenResponse.java │ │ │ │ │ │ └── MicrosoftStsTokenResponseHandler.java │ │ │ │ └── oauth2 │ │ │ │ │ ├── AccessToken.java │ │ │ │ │ ├── AuthorizationErrorResponse.java │ │ │ │ │ ├── AuthorizationRequest.java │ │ │ │ │ ├── AuthorizationResponse.java │ │ │ │ │ ├── AuthorizationResult.java │ │ │ │ │ ├── AuthorizationResultFactory.java │ │ │ │ │ ├── AuthorizationStatus.java │ │ │ │ │ ├── ClientAssertion.java │ │ │ │ │ ├── DefaultStateGenerator.java │ │ │ │ │ ├── IAuthorizationStrategy.java │ │ │ │ │ ├── IDToken.java │ │ │ │ │ ├── IErrorResponse.java │ │ │ │ │ ├── IResult.java │ │ │ │ │ ├── IStateGenerator.java │ │ │ │ │ ├── ISuccessResponse.java │ │ │ │ │ ├── ITokenResponseHandler.java │ │ │ │ │ ├── OAuth2Configuration.java │ │ │ │ │ ├── OAuth2Strategy.java │ │ │ │ │ ├── OAuth2StrategyParameters.java │ │ │ │ │ ├── OAuth2TokenCache.java │ │ │ │ │ ├── OpenIdConnectPromptParameter.java │ │ │ │ │ ├── OpenIdProviderConfiguration.java │ │ │ │ │ ├── OpenIdProviderConfigurationClient.java │ │ │ │ │ ├── PkceChallenge.java │ │ │ │ │ ├── RefreshToken.java │ │ │ │ │ ├── TokenErrorResponse.java │ │ │ │ │ ├── TokenRequest.java │ │ │ │ │ ├── TokenResponse.java │ │ │ │ │ └── TokenResult.java │ │ │ │ ├── registry │ │ │ │ ├── BrokerApplicationRegistryData.java │ │ │ │ ├── DefaultBrokerApplicationRegistry.java │ │ │ │ └── IBrokerApplicationRegistry.java │ │ │ │ ├── request │ │ │ │ ├── BrokerRequestType.java │ │ │ │ ├── ILocalAuthenticationCallback.java │ │ │ │ └── SdkType.java │ │ │ │ ├── result │ │ │ │ ├── AcquireTokenResult.java │ │ │ │ ├── FinalizableResultFuture.java │ │ │ │ ├── GenerateShrResult.java │ │ │ │ ├── ILocalAuthenticationResult.java │ │ │ │ ├── LocalAuthenticationResult.java │ │ │ │ └── VoidResult.java │ │ │ │ ├── storage │ │ │ │ ├── EncryptedNameValueStorage.java │ │ │ │ ├── IGenericTypeStringAdapter.java │ │ │ │ ├── MultiTypeNameValueStorage.java │ │ │ │ └── StringSeparatedMultiTypeNameValueStorage.java │ │ │ │ ├── strategies │ │ │ │ └── IAuthorizationStrategyFactory.java │ │ │ │ ├── telemetry │ │ │ │ ├── AbstractTelemetryContext.java │ │ │ │ ├── CliTelemInfo.java │ │ │ │ ├── ITelemetryAccessor.java │ │ │ │ ├── ITelemetryCallback.java │ │ │ │ ├── Properties.java │ │ │ │ ├── Telemetry.java │ │ │ │ ├── TelemetryConfiguration.java │ │ │ │ ├── TelemetryEventStrings.java │ │ │ │ ├── TelemetryPropertiesCache.java │ │ │ │ ├── adapter │ │ │ │ │ ├── BrokerTelemetryAdapter.java │ │ │ │ │ ├── ITelemetryAdapter.java │ │ │ │ │ ├── TelemetryAggregationAdapter.java │ │ │ │ │ └── TelemetryDefaultAdapter.java │ │ │ │ ├── events │ │ │ │ │ ├── ApiEndEvent.java │ │ │ │ │ ├── ApiStartEvent.java │ │ │ │ │ ├── BaseEvent.java │ │ │ │ │ ├── BrokerEvent.java │ │ │ │ │ ├── CacheEndEvent.java │ │ │ │ │ ├── CacheStartEvent.java │ │ │ │ │ ├── CertBasedAuthResultEvent.java │ │ │ │ │ ├── ContentProviderCallEvent.java │ │ │ │ │ ├── DeprecatedApiUsageEvent.java │ │ │ │ │ ├── ErrorEvent.java │ │ │ │ │ ├── HttpEndEvent.java │ │ │ │ │ ├── HttpStartEvent.java │ │ │ │ │ ├── PivProviderStatusEvent.java │ │ │ │ │ └── UiShownEvent.java │ │ │ │ ├── observers │ │ │ │ │ ├── IBrokerTelemetryObserver.java │ │ │ │ │ ├── ITelemetryAggregatedObserver.java │ │ │ │ │ ├── ITelemetryDefaultObserver.java │ │ │ │ │ └── ITelemetryObserver.java │ │ │ │ ├── relay │ │ │ │ │ ├── AbstractTelemetryRelayClient.java │ │ │ │ │ ├── ITelemetryEventFilter.java │ │ │ │ │ └── TelemetryRelayException.java │ │ │ │ └── rules │ │ │ │ │ ├── TelemetryAggregationRules.java │ │ │ │ │ └── TelemetryPiiOiiRules.java │ │ │ │ ├── ui │ │ │ │ ├── AuthorizationAgent.java │ │ │ │ ├── BrowserDescriptor.java │ │ │ │ ├── PreferredAuthMethod.kt │ │ │ │ └── webview │ │ │ │ │ └── authorization │ │ │ │ │ └── IAuthorizationCompletionCallback.java │ │ │ │ └── util │ │ │ │ ├── ArgUtils.kt │ │ │ │ ├── BiConsumer.java │ │ │ │ ├── BrokerProtocolVersionUtil.java │ │ │ │ ├── CachedData.java │ │ │ │ ├── CharArrayJsonAdapter.java │ │ │ │ ├── ClientExtraSku.java │ │ │ │ ├── ClockSkewManager.java │ │ │ │ ├── CommonURIBuilder.java │ │ │ │ ├── CopyUtil.java │ │ │ │ ├── DateExtensions.java │ │ │ │ ├── FileUtil.java │ │ │ │ ├── HashMapExtensions.java │ │ │ │ ├── HeaderSerializationUtil.java │ │ │ │ ├── IBroadcaster.java │ │ │ │ ├── IClockSkewManager.java │ │ │ │ ├── IPlatformUtil.java │ │ │ │ ├── JWSBuilder.java │ │ │ │ ├── JsonUtil.java │ │ │ │ ├── ObjectMapper.java │ │ │ │ ├── QueryParamsAdapter.java │ │ │ │ ├── ResultFuture.java │ │ │ │ ├── ResultUtil.java │ │ │ │ ├── SchemaUtil.java │ │ │ │ ├── StringUtil.java │ │ │ │ ├── Supplier.java │ │ │ │ ├── TaskCompletedCallback.java │ │ │ │ ├── TaskCompletedCallbackWithError.java │ │ │ │ ├── ThreadUtils.java │ │ │ │ ├── ThrowableUtil.java │ │ │ │ ├── UrlUtil.java │ │ │ │ └── ported │ │ │ │ ├── Consumer.java │ │ │ │ ├── DateUtilities.java │ │ │ │ ├── Function.java │ │ │ │ ├── InMemoryStorage.java │ │ │ │ ├── LocalBroadcaster.java │ │ │ │ ├── ObjectUtils.java │ │ │ │ ├── Predicate.java │ │ │ │ ├── PropertyBag.java │ │ │ │ └── Supplier.java │ │ └── io │ │ │ └── opentelemetry │ │ │ ├── api │ │ │ ├── NoopOpenTelemetry.java │ │ │ ├── metrics │ │ │ │ └── NoopMeterProvider.java │ │ │ └── trace │ │ │ │ └── NoopTracerProvider.java │ │ │ └── context │ │ │ └── propagation │ │ │ └── NoopContextPropagators.java │ ├── test │ │ └── com │ │ │ └── microsoft │ │ │ └── identity │ │ │ └── common │ │ │ └── java │ │ │ ├── MseberaBase64ForCommon4jTests.kt │ │ │ ├── TestUtils.java │ │ │ ├── authorities │ │ │ ├── AuthorityDeserializerTest.java │ │ │ └── CIAMAuthorityTest.java │ │ │ ├── authscheme │ │ │ ├── PopAuthenticationSchemeTest.java │ │ │ └── PopAuthenticationSchemeWithClientKeyTest.java │ │ │ ├── challengehandlers │ │ │ ├── MockCertLoader.java │ │ │ ├── MockData.java │ │ │ ├── PKeyAuthChallengeFactoryTest.java │ │ │ └── PKeyAuthChallengeTest.java │ │ │ ├── controllers │ │ │ └── ExceptionAdapterTests.java │ │ │ ├── crypto │ │ │ ├── KeyUtilTest.java │ │ │ ├── MockAES256KeyLoader.java │ │ │ ├── MockAES256KeyLoaderWithGetKeyError.java │ │ │ ├── MockData.java │ │ │ ├── MockStorageEncryptionManager.java │ │ │ ├── SP800108KeyGenTests.java │ │ │ └── StorageEncryptionManagerTest.java │ │ │ ├── dto │ │ │ └── AccessTokenTest.java │ │ │ ├── eststelemetry │ │ │ ├── EstsTelemetryTest.java │ │ │ ├── MockAuthenticationResult.java │ │ │ ├── MockCommand.java │ │ │ └── MockCommandResult.java │ │ │ ├── flighting │ │ │ ├── CommonFlightsManagerTest.java │ │ │ ├── MockFlights.java │ │ │ ├── MockFlightsManager.java │ │ │ └── MockFlightsProvider.java │ │ │ ├── jwt │ │ │ ├── JwtRequestTests.java │ │ │ └── JwtUtilsTest.java │ │ │ ├── logging │ │ │ ├── ILoggableTest.kt │ │ │ ├── LibraryInfoHelperTest.java │ │ │ └── LoggerTest.java │ │ │ ├── nativeauth │ │ │ └── providers │ │ │ │ ├── NativeAuthRequestProviderTest.kt │ │ │ │ └── NativeAuthResponseHandlerTest.kt │ │ │ ├── net │ │ │ ├── HttpResponseTests.java │ │ │ ├── HttpUrlConnectionFactoryTest.java │ │ │ └── UrlConnectionHttpClientTest.java │ │ │ ├── platform │ │ │ ├── DeviceTest.java │ │ │ ├── JweResponseTests.java │ │ │ └── MockDeviceMetadata.java │ │ │ ├── providers │ │ │ ├── Constants.java │ │ │ ├── RawAuthorizationResultTest.java │ │ │ ├── microsoft │ │ │ │ ├── MicrosoftAuthorizationRequestTest.java │ │ │ │ ├── MockMicrosoftAuthorizationRequest.java │ │ │ │ ├── azureactivedirectory │ │ │ │ │ └── AzureActiveDirectoryAuthorizationResultFactoryTest.java │ │ │ │ └── microsoftsts │ │ │ │ │ ├── MicrosoftStsAuthorizationRequestTests.java │ │ │ │ │ ├── MicrosoftStsAuthorizationResultFactoryTest.java │ │ │ │ │ ├── MicrosoftStsOAuth2StrategyTest.java │ │ │ │ │ ├── MicrosoftStsTokenRequestTests.java │ │ │ │ │ └── MicrosoftStsTokenResponseHandlerTest.java │ │ │ └── oauth2 │ │ │ │ ├── AuthorizationRequestTests.java │ │ │ │ ├── MockAuthorizationRequest.java │ │ │ │ ├── OAuth2StrategyTest.java │ │ │ │ ├── OpenIdConnectPromptParameterTest.java │ │ │ │ └── PkceChallengeTest.java │ │ │ ├── storage │ │ │ └── StringSeparatedMultiTypeNameValueStorageTest.java │ │ │ ├── telemetry │ │ │ ├── MockTelemetryContext.java │ │ │ └── TelemetryTest.java │ │ │ └── util │ │ │ ├── BrokerProtocolVersionUtilTest.java │ │ │ ├── ClientExtraSkuTest.java │ │ │ ├── ClockSkewManagerTest.java │ │ │ ├── CommonURIBuilderTest.java │ │ │ ├── HeaderSerializationUtilTest.java │ │ │ ├── JwsBuilderTest.java │ │ │ ├── LocalBroadcasterTest.java │ │ │ ├── ObjectMapperTest.java │ │ │ ├── QueryParamsAdapterTest.java │ │ │ ├── ThreadUtilsTests.java │ │ │ └── UrlUtilTest.java │ └── testFixtures │ │ └── java │ │ └── com │ │ └── microsoft │ │ └── identity │ │ ├── common │ │ ├── components │ │ │ ├── InMemoryStorageSupplier.kt │ │ │ └── MockPlatformComponentsFactory.java │ │ └── nativeauth │ │ │ ├── ApiConstants.kt │ │ │ ├── MockApi.kt │ │ │ ├── MockApiEndpoint.kt │ │ │ ├── MockApiResponseType.kt │ │ │ └── MockApiUtils.kt │ │ ├── common4j │ │ └── env │ │ │ ├── BuildReason.kt │ │ │ └── EnvironmentVariable.java │ │ ├── http │ │ ├── HttpRequestExaminer.java │ │ ├── HttpRequestInterceptor.java │ │ ├── HttpRequestMatcher.java │ │ ├── HttpRequestRewriter.java │ │ ├── HttpResponseRewriter.java │ │ ├── InterceptedHttpClient.java │ │ ├── InterceptedHttpClientWrapper.java │ │ ├── MockConnection.java │ │ ├── MockHttpClient.java │ │ └── ResponseBody.java │ │ └── shadow │ │ └── ShadowHttpClient.java └── versioning │ ├── version.properties │ └── version_tasks.gradle ├── config ├── checkstyle │ ├── checkstyle.xml │ └── suppressions.xml ├── credscan │ └── suppression.json └── spotbugs │ └── exclude.xml ├── gradle.properties ├── gradle ├── verification-metadata.xml ├── versions.gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── keyvault ├── .gitignore ├── build.gradle └── src │ └── main │ └── java │ └── com │ └── microsoft │ └── identity │ └── internal │ └── test │ └── keyvault │ ├── ApiCallback.java │ ├── ApiClient.java │ ├── ApiException.java │ ├── ApiResponse.java │ ├── Configuration.java │ ├── GzipRequestInterceptor.java │ ├── JSON.java │ ├── Pair.java │ ├── ProgressRequestBody.java │ ├── ProgressResponseBody.java │ ├── StringUtil.java │ ├── api │ ├── CertificatesApi.java │ ├── DeletedCertificatesApi.java │ ├── DeletedKeysApi.java │ ├── DeletedSecretsApi.java │ ├── KeysApi.java │ ├── SecretsApi.java │ └── StorageApi.java │ ├── auth │ ├── ApiKeyAuth.java │ ├── Authentication.java │ ├── HttpBasicAuth.java │ ├── OAuth.java │ └── OAuthFlow.java │ └── model │ ├── Action.java │ ├── AdministratorDetails.java │ ├── Attributes.java │ ├── BackupKeyResult.java │ ├── BackupSecretResult.java │ ├── CertificateAttributes.java │ ├── CertificateBundle.java │ ├── CertificateCreateParameters.java │ ├── CertificateImportParameters.java │ ├── CertificateIssuerItem.java │ ├── CertificateIssuerListResult.java │ ├── CertificateIssuerSetParameters.java │ ├── CertificateIssuerUpdateParameters.java │ ├── CertificateItem.java │ ├── CertificateListResult.java │ ├── CertificateMergeParameters.java │ ├── CertificateOperation.java │ ├── CertificateOperationUpdateParameter.java │ ├── CertificatePolicy.java │ ├── CertificateUpdateParameters.java │ ├── Contact.java │ ├── Contacts.java │ ├── DeletedCertificateBundle.java │ ├── DeletedCertificateItem.java │ ├── DeletedCertificateListResult.java │ ├── DeletedKeyBundle.java │ ├── DeletedKeyItem.java │ ├── DeletedKeyListResult.java │ ├── DeletedSecretBundle.java │ ├── DeletedSecretItem.java │ ├── DeletedSecretListResult.java │ ├── Error.java │ ├── IssuerAttributes.java │ ├── IssuerBundle.java │ ├── IssuerCredentials.java │ ├── IssuerParameters.java │ ├── JsonWebKey.java │ ├── KeyAttributes.java │ ├── KeyBundle.java │ ├── KeyCreateParameters.java │ ├── KeyImportParameters.java │ ├── KeyItem.java │ ├── KeyListResult.java │ ├── KeyOperationResult.java │ ├── KeyOperationsParameters.java │ ├── KeyProperties.java │ ├── KeyRestoreParameters.java │ ├── KeySignParameters.java │ ├── KeyUpdateParameters.java │ ├── KeyVaultError.java │ ├── KeyVerifyParameters.java │ ├── KeyVerifyResult.java │ ├── LifetimeAction.java │ ├── OrganizationDetails.java │ ├── PendingCertificateSigningRequestResult.java │ ├── SasDefinitionAttributes.java │ ├── SasDefinitionBundle.java │ ├── SasDefinitionCreateParameters.java │ ├── SasDefinitionItem.java │ ├── SasDefinitionListResult.java │ ├── SasDefinitionUpdateParameters.java │ ├── SecretAttributes.java │ ├── SecretBundle.java │ ├── SecretItem.java │ ├── SecretListResult.java │ ├── SecretProperties.java │ ├── SecretRestoreParameters.java │ ├── SecretSetParameters.java │ ├── SecretUpdateParameters.java │ ├── StorageAccountAttributes.java │ ├── StorageAccountCreateParameters.java │ ├── StorageAccountItem.java │ ├── StorageAccountRegenerteKeyParameters.java │ ├── StorageAccountUpdateParameters.java │ ├── StorageBundle.java │ ├── StorageListResult.java │ ├── SubjectAlternativeNames.java │ ├── Trigger.java │ └── X509CertificateProperties.java ├── labapi ├── .gitignore ├── build.gradle └── src │ └── main │ └── java │ └── com │ └── microsoft │ └── identity │ └── internal │ └── test │ └── labapi │ ├── ApiCallback.java │ ├── ApiClient.java │ ├── ApiException.java │ ├── ApiResponse.java │ ├── Configuration.java │ ├── GzipRequestInterceptor.java │ ├── JSON.java │ ├── Pair.java │ ├── ProgressRequestBody.java │ ├── ProgressResponseBody.java │ ├── StringUtil.java │ ├── api │ ├── AppApi.java │ ├── ConfigApi.java │ ├── CreateTempUserApi.java │ ├── DeleteDeviceApi.java │ ├── DisablePolicyApi.java │ ├── EnablePolicyApi.java │ ├── LabApi.java │ ├── LabAvailabilityApi.java │ ├── LabPolicyInfoApi.java │ ├── LabSecretApi.java │ ├── LabUserSecretApi.java │ ├── ResetApi.java │ ├── TempUserInfoApi.java │ └── UserApi.java │ ├── auth │ ├── ApiKeyAuth.java │ ├── Authentication.java │ ├── HttpBasicAuth.java │ ├── OAuth.java │ └── OAuthFlow.java │ └── model │ ├── AppInfo.java │ ├── ConfigInfo.java │ ├── CustomErrorResponse.java │ ├── CustomSuccessResponse.java │ ├── LabAvailability.java │ ├── LabInfo.java │ ├── SecretResponse.java │ ├── TempUser.java │ ├── TempUserInfo.java │ ├── User.java │ └── UserInfo.java ├── settings.gradle ├── testutils ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── microsoft │ │ └── identity │ │ └── internal │ │ └── testutils │ │ ├── CacheUtils.java │ │ ├── MicrosoftStsRopcTokenRequest.java │ │ ├── MockRecords.kt │ │ ├── MseberaBase64ForTestUtils.kt │ │ ├── TestConstants.java │ │ ├── TestUtils.java │ │ ├── authorities │ │ ├── AADTestAuthority.java │ │ ├── B2CTestAuthority.java │ │ ├── CIAMTestAuthority.java │ │ ├── MockAuthority.java │ │ ├── MockAuthorityHttpResponse.java │ │ └── MockDelayedResponseAuthority.java │ │ ├── kusto │ │ ├── CSVWriter.java │ │ ├── CaptureKustoTestResultRule.java │ │ ├── EstsKustoClientTestTableData.java │ │ ├── IKustoTableData.java │ │ ├── KustoTableDataCsvWriter.java │ │ └── TestResultFileUtils.java │ │ ├── labutils │ │ ├── ConfidentialClientHelper.java │ │ ├── Credential.java │ │ ├── KeyVaultAuthHelper.java │ │ ├── KeyVaultFetchHelper.java │ │ ├── LabApiException.java │ │ ├── LabAuthenticationHelper.java │ │ ├── LabConfig.java │ │ ├── LabConstants.java │ │ ├── LabDeviceHelper.java │ │ ├── LabGuest.java │ │ ├── LabGuestAccountHelper.java │ │ ├── LabHelper.java │ │ ├── LabResetHelper.java │ │ ├── LabUserHelper.java │ │ ├── LabUserQuery.java │ │ └── PolicyHelper.java │ │ ├── mocks │ │ ├── MockServerResponse.java │ │ ├── MockSuccessAuthorizationResultMockedTests.java │ │ ├── MockSuccessAuthorizationResultNetworkTests.java │ │ ├── MockTokenCreator.java │ │ └── MockTokenResponse.java │ │ ├── nativeauth │ │ ├── ConfigType.kt │ │ └── api │ │ │ ├── TemporaryEmailService.kt │ │ │ └── models │ │ │ ├── EmailContent.kt │ │ │ ├── InboxContent.kt │ │ │ └── NativeAuthTestConfig.kt │ │ └── strategies │ │ ├── MockDelayedResponseStrategy.java │ │ ├── MockStrategyWithMockedHttpResponse.java │ │ ├── MockTestStrategy.java │ │ └── ResourceOwnerPasswordCredentialsTestStrategy.java │ └── res │ └── values │ └── attrs.xml ├── uiautomationutilities ├── .gitignore ├── build.gradle ├── perf_tool │ ├── MathUtils.cs │ ├── MeasurementsConfiguration.cs │ ├── MeasurementsData.cs │ ├── MeasurementsStore.cs │ ├── Parameter.cs │ ├── PerfData.cs │ ├── PerfDataConfiguration.cs │ ├── PerfDataConfiguration.xml │ ├── PerfDataRecord.cs │ ├── PerfIdentity.csproj │ ├── PerfIdentity.sln │ ├── PerfMeasurement.cs │ ├── PerfMeasurementConfigurationsProvider.cs │ ├── PerfMeasurementsSet.cs │ ├── PerformanceMetric.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── ReportHelper.cs │ ├── Task.cs │ ├── View.cs │ ├── XMLUtility.cs │ ├── changelog.txt │ ├── command.cs │ └── readme.md ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── microsoft │ └── identity │ └── client │ └── ui │ └── automation │ ├── IBrokerHostTest.java │ ├── IBrokerTest.java │ ├── ICustomBrokerInstallationTest.java │ ├── ILabTest.java │ ├── IRuleBasedTest.java │ ├── TestContext.java │ ├── TokenRequestLatch.java │ ├── TokenRequestTimeout.java │ ├── annotations │ ├── DoNotRunOnPipeline.java │ ├── FailsWithDailyVersions.java │ ├── LTWTests.java │ ├── LocalBrokerHostDebugUiTest.java │ ├── LongUIAutomationTest.java │ ├── RetryOnFailure.java │ ├── RunOnAPI29Minus.java │ └── SupportedBrokers.java │ ├── app │ ├── App.java │ ├── AzureSampleApp.java │ ├── IApp.java │ ├── IFirstPartyApp.java │ ├── MsalTestApp.java │ ├── OneAuthTestApp.java │ ├── OneDriveApp.java │ ├── OutlookApp.java │ ├── TeamsApp.java │ └── WordApp.java │ ├── broker │ ├── AbstractBrokerHost.java │ ├── AbstractTestBroker.java │ ├── BrokerApiFragment.java │ ├── BrokerAuthenticatorPreviousVersionImpl.java │ ├── BrokerAuthenticatorUpdatedVersionImpl.java │ ├── BrokerCompanyPortal.java │ ├── BrokerFlightsFragment.java │ ├── BrokerHost.java │ ├── BrokerLTW.java │ ├── BrokerMicrosoftAuthenticator.java │ ├── DeviceLimitReachedException.java │ ├── IMdmAgent.java │ ├── ITestBroker.java │ ├── MultipleWpjApiFragment.java │ └── SingleWpjApiFragment.java │ ├── browser │ ├── BrowserChrome.java │ ├── BrowserEdge.java │ └── IBrowser.java │ ├── constants │ ├── AuthScheme.java │ ├── DeviceAdmin.java │ └── GlobalConstants.java │ ├── device │ ├── TestDevice.java │ └── settings │ │ ├── BaseSettings.java │ │ ├── GoogleSettings.java │ │ ├── ISettings.java │ │ └── SamsungSettings.java │ ├── installer │ ├── IAppInstaller.java │ ├── LocalApkInstaller.java │ └── PlayStore.java │ ├── interaction │ ├── AbstractPromptHandler.java │ ├── FirstPartyAppPromptHandlerParameters.java │ ├── IOAuth2LoginComponentHandler.java │ ├── IPromptHandler.java │ ├── OnInteractionRequired.java │ ├── PromptHandlerParameters.java │ ├── PromptParameter.java │ ├── UiResponse.java │ ├── b2c │ │ ├── AbstractB2CLoginComponentHandler.java │ │ ├── B2CIdLabLocalLoginComponentHandler.java │ │ ├── B2CPromptHandlerParameters.java │ │ ├── B2CProviderWrapper.java │ │ ├── FacebookLoginComponentHandler.java │ │ ├── GoogleLoginComponentHandler.java │ │ └── IdLabB2cSisoPolicyPromptHandler.java │ └── microsoftsts │ │ ├── AadLoginComponentHandler.java │ │ ├── AadPromptHandler.java │ │ ├── AdfsLoginComponentHandler.java │ │ ├── AdfsPromptHandler.java │ │ ├── IMicrosoftStsLoginComponentHandler.java │ │ ├── MicrosoftStsPromptHandler.java │ │ ├── MicrosoftStsPromptHandlerParameters.java │ │ └── TlsPromptHandler.java │ ├── logging │ ├── LogLevel.java │ ├── Logger.java │ ├── appender │ │ ├── AbstractAppender.java │ │ ├── AppenderRegistry.java │ │ ├── ConsoleAppender.java │ │ ├── FileAppender.java │ │ ├── IAppender.java │ │ └── LogcatAppender.java │ └── formatter │ │ ├── ILogFormatter.java │ │ ├── LogcatLikeFormatter.java │ │ └── SimpleTextFormatter.java │ ├── performance │ ├── CPUMonitor.java │ ├── DeviceMonitor.java │ ├── MemoryMonitor.java │ ├── NetworkUsageMonitor.java │ ├── PerformanceProfile.java │ ├── PerformanceProfileMonitor.java │ ├── ProcessInfo.java │ └── TrafficInfo.java │ ├── powerlift │ ├── IPowerLiftIntegratedApp.java │ └── ThrowableWithPowerLiftIncident.java │ ├── rules │ ├── AutomationLoggingRule.java │ ├── BrokerSupportRule.java │ ├── CopyFileRule.java │ ├── CopyPreInstalledApkRule.java │ ├── DeviceEnrollmentFailureRecoveryRule.java │ ├── DevicePinSetupRule.java │ ├── FactoryResetChromeRule.java │ ├── InstallBrokerTestRule.java │ ├── LoadLabUserTestRule.java │ ├── PowerLiftIncidentRule.java │ ├── RemoveBrokersBeforeTestRule.java │ ├── RemoveFirstPartyAppsTestRule.java │ ├── ResetAutomaticTimeZoneTestRule.java │ ├── RetryTestRule.java │ ├── RulesHelper.java │ ├── UiAutomatorTestRule.java │ └── UncaughtExceptionHandlerRule.java │ ├── sdk │ ├── AuthResult.java │ ├── AuthTestParams.java │ ├── IAuthSdk.java │ └── ResultFuture.java │ └── utils │ ├── AdbShellUtils.java │ ├── CommonUtils.java │ └── UiAutomatorUtils.java └── versioning ├── version.properties └── version_tasks.gradle /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: CI 4 | 5 | # Controls when the action will run. 6 | on: 7 | # Triggers the workflow on push or pull request events but only for the dev branch 8 | push: 9 | branches: [ dev ] 10 | pull_request: 11 | branches: [ dev ] 12 | 13 | # Allows you to run this workflow manually from the Actions tab 14 | workflow_dispatch: 15 | 16 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 17 | jobs: 18 | # This workflow contains a single job called "build" 19 | build: 20 | # The type of runner that the job will run on 21 | runs-on: ubuntu-latest 22 | 23 | # Steps represent a sequence of tasks that will be executed as part of the job 24 | steps: 25 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 26 | - uses: actions/checkout@v2 27 | 28 | # Runs a single command using the runners shell 29 | - name: Run a one-line script 30 | run: echo Hello, world! 31 | 32 | # Runs a set of commands using the runners shell 33 | - name: Run a multi-line script 34 | run: | 35 | echo Add other actions to build, 36 | echo test, and deploy your project. 37 | docker --version 38 | docker ps 39 | env 40 | -------------------------------------------------------------------------------- /.github/workflows/pull-request.yml: -------------------------------------------------------------------------------- 1 | # This is a workflow to run the deploy snapshot pipeline in Azure DevOps 2 | name: pr_validation 3 | 4 | # Controls when the action will run. Triggers the workflow on push or pull request 5 | # events but only for the dev branch 6 | on: 7 | pull_request: 8 | types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] 9 | branches: [ dev ] 10 | 11 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # Make sure we have a changelog entry 14 | changelog: 15 | runs-on: ubuntu-latest 16 | 17 | # Steps represent a sequence of tasks that will be executed as part of the job 18 | steps: 19 | - uses: actions/checkout@v2 20 | - uses: dangoslen/changelog-enforcer@v1.4.0 21 | with: 22 | changeLogPath: 'changelog.txt' 23 | skipLabel: 'No-Changelog' 24 | 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the ART/Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # VSCode project file. 12 | .project 13 | .classpath 14 | .settings 15 | 16 | # Generated files 17 | bin/ 18 | gen/ 19 | out/ 20 | 21 | # Gradle files 22 | .gradle/ 23 | build/ 24 | 25 | # Local configuration file (sdk path, etc) 26 | local.properties 27 | 28 | # Proguard folder generated by Eclipse 29 | proguard/ 30 | 31 | # Log Files 32 | *.log 33 | 34 | # Android Studio Navigation editor temp files 35 | .navigation/ 36 | 37 | # Android Studio captures folder 38 | captures/ 39 | 40 | # IntelliJ 41 | *.iml 42 | .idea 43 | 44 | # Keystore files 45 | # Uncomment the following line if you do not want to check your keystore files in. 46 | #*.jks 47 | 48 | # External native build folder generated in Android Studio 2.2 and later 49 | .externalNativeBuild 50 | 51 | # Google Services (e.g. APIs or Firebase) 52 | google-services.json 53 | 54 | # Freeline 55 | freeline.py 56 | freeline/ 57 | freeline_project_description.json 58 | 59 | # Ignore poms 60 | *.pom 61 | 62 | # General 63 | .DS_Store 64 | .AppleDouble 65 | .LSOverride 66 | 67 | # Icon must end with two \r 68 | Icon 69 | 70 | # Thumbnails 71 | ._* 72 | 73 | # Files that might appear in the root of a volume 74 | .DocumentRevisions-V100 75 | .fseventsd 76 | .Spotlight-V100 77 | .TemporaryItems 78 | .Trashes 79 | .VolumeIcon.icns 80 | .com.apple.timemachine.donotpresent 81 | 82 | # Directories potentially created on remote AFP share 83 | .AppleDB 84 | .AppleDesktop 85 | Network Trash Folder 86 | Temporary Items 87 | .apdisk 88 | 89 | .vs/ 90 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Each line is a file pattern followed by one or more owners. 2 | # Reference: https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners 3 | 4 | 5 | # Repo Code Owners 6 | #-------------------- 7 | 8 | * @AzureAD/androididentity 9 | 10 | # Shared Ownership 11 | #--------------------- 12 | changelog.txt @AzureAD/androididentity @AzureAD/NativeAuthTeam 13 | 14 | # Area Owners 15 | #--------------------- 16 | # @AzureAD/NativeAuthTeam owns any files related to CIAM native authentication. 17 | /common/src/main/java/com/microsoft/identity/common/nativeauth/ @AzureAD/NativeAuthTeam 18 | /common/src/test/java/com/microsoft/identity/common/nativeauth/ @AzureAD/NativeAuthTeam 19 | 20 | /common4j/src/main/com/microsoft/identity/common/java/nativeauth/ @AzureAD/NativeAuthTeam 21 | /common4j/src/test/com/microsoft/identity/common/java/nativeauth/ @AzureAD/NativeAuthTeam 22 | /common4j/src/testFixtures/java/com/microsoft/identity/common/nativeauth/ @AzureAD/NativeAuthTeam 23 | 24 | 25 | # If you are interested in reviewing or getting notified of changes in a particular area 26 | # Please add your alias against that specific path below 27 | # Example: 28 | # /common4j/src/main/java/com/microsoft/identity/common/java/interfaces/ @iamgusain 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /LabApiUtilities/.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the ART/Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # VSCode project file. 12 | .project 13 | .classpath 14 | .settings 15 | 16 | # Generated files 17 | bin/ 18 | gen/ 19 | out/ 20 | 21 | # Gradle files 22 | .gradle/ 23 | build/ 24 | 25 | # Local configuration file (sdk path, etc) 26 | local.properties 27 | 28 | # Proguard folder generated by Eclipse 29 | proguard/ 30 | 31 | # Log Files 32 | *.log 33 | 34 | # Android Studio Navigation editor temp files 35 | .navigation/ 36 | 37 | # Android Studio captures folder 38 | captures/ 39 | 40 | # IntelliJ 41 | *.iml 42 | .idea 43 | 44 | # Keystore files 45 | # Uncomment the following line if you do not want to check your keystore files in. 46 | #*.jks 47 | 48 | # External native build folder generated in Android Studio 2.2 and later 49 | .externalNativeBuild 50 | 51 | # Google Services (e.g. APIs or Firebase) 52 | google-services.json 53 | 54 | # Freeline 55 | freeline.py 56 | freeline/ 57 | freeline_project_description.json 58 | 59 | # Ignore poms 60 | *.pom 61 | 62 | # General 63 | .DS_Store 64 | .AppleDouble 65 | .LSOverride 66 | 67 | # Icon must end with two \r 68 | Icon 69 | 70 | # Thumbnails 71 | ._* 72 | 73 | # Files that might appear in the root of a volume 74 | .DocumentRevisions-V100 75 | .fseventsd 76 | .Spotlight-V100 77 | .TemporaryItems 78 | .Trashes 79 | .VolumeIcon.icns 80 | .com.apple.timemachine.donotpresent 81 | 82 | # Directories potentially created on remote AFP share 83 | .AppleDB 84 | .AppleDesktop 85 | Network Trash Folder 86 | Temporary Items 87 | .apdisk 88 | 89 | # gradle stuffs 90 | gradlew 91 | gradlew.bat 92 | gradle-wrapper.jar 93 | -------------------------------------------------------------------------------- /LabApiUtilities/src/main/com/microsoft/identity/labapi/utilities/authentication/ITokenParameters.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.labapi.utilities.authentication; 24 | 25 | import java.util.Set; 26 | 27 | /** 28 | * An interface describing token parameters that can be used for acquiring tokens. 29 | */ 30 | public interface ITokenParameters { 31 | 32 | String getAuthority(); 33 | 34 | Set getScopes(); 35 | 36 | String getClientId(); 37 | 38 | String getResource(); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /LabApiUtilities/src/main/com/microsoft/identity/labapi/utilities/authentication/LabAuthenticationConstants.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.labapi.utilities.authentication; 24 | 25 | public class LabAuthenticationConstants { 26 | 27 | public static final String AUDIENCE_CLAIM = "aud"; 28 | public static final String KEY_VAULT_TOKEN_AUDIENCE = "https://vault.azure.net"; 29 | public static final String LAB_API_TOKEN_AUDIENCE = "https://request.msidlab.com"; 30 | public static final String UPN_CLAIM = "upn"; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /LabApiUtilities/src/main/com/microsoft/identity/labapi/utilities/constants/AltIdSource.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.labapi.utilities.constants; 24 | 25 | public enum AltIdSource { 26 | NONE(LabConstants.AltIdSource.NONE), 27 | ON_PREM(LabConstants.AltIdSource.ON_PREM); 28 | 29 | final String value; 30 | 31 | AltIdSource(final String value) { 32 | this.value = value; 33 | } 34 | 35 | @Override 36 | public String toString() { 37 | return value; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LabApiUtilities/src/main/com/microsoft/identity/labapi/utilities/constants/AltIdType.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.labapi.utilities.constants; 24 | 25 | public enum AltIdType { 26 | NONE(LabConstants.AltIdType.NONE), 27 | UPN(LabConstants.AltIdType.UPN); 28 | 29 | final String value; 30 | 31 | AltIdType(final String value) { 32 | this.value = value; 33 | } 34 | 35 | @Override 36 | public String toString() { 37 | return value; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LabApiUtilities/src/main/com/microsoft/identity/labapi/utilities/constants/AppType.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.labapi.utilities.constants; 24 | 25 | public enum AppType { 26 | CLOUD(LabConstants.AppType.CLOUD), 27 | ON_PREM(LabConstants.AppType.ON_PREM); 28 | 29 | final String value; 30 | 31 | AppType(final String value) { 32 | this.value = value; 33 | } 34 | 35 | @Override 36 | public String toString() { 37 | return value; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LabApiUtilities/src/main/com/microsoft/identity/labapi/utilities/constants/HasAltId.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.labapi.utilities.constants; 24 | 25 | public enum HasAltId { 26 | NO(LabConstants.HasAltId.NO), 27 | YES(LabConstants.HasAltId.YES); 28 | 29 | final String value; 30 | 31 | HasAltId(final String value) { 32 | this.value = value; 33 | } 34 | 35 | @Override 36 | public String toString() { 37 | return value; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LabApiUtilities/src/main/com/microsoft/identity/labapi/utilities/constants/IsAdminConsented.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.labapi.utilities.constants; 24 | 25 | public enum IsAdminConsented { 26 | YES(LabConstants.IsAdminConsented.YES), 27 | NO(LabConstants.IsAdminConsented.NO); 28 | String value; 29 | 30 | IsAdminConsented(final String value) { 31 | this.value = value; 32 | } 33 | 34 | @Override 35 | public String toString() { 36 | return value; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /LabApiUtilities/src/main/com/microsoft/identity/labapi/utilities/constants/Mfa.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.labapi.utilities.constants; 24 | 25 | public enum Mfa { 26 | NONE(LabConstants.Mfa.NONE), 27 | MFA_ON_ALL(LabConstants.Mfa.MFA_ON_ALL), 28 | AUTO_MFA_ON_ALL(LabConstants.Mfa.AUTO_MFA_ON_ALL); 29 | 30 | final String value; 31 | 32 | Mfa(final String value) { 33 | this.value = value; 34 | } 35 | 36 | @Override 37 | public String toString() { 38 | return value; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /LabApiUtilities/src/main/com/microsoft/identity/labapi/utilities/constants/PasswordPolicyValidityPeriod.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.labapi.utilities.constants; 24 | 25 | public enum PasswordPolicyValidityPeriod { 26 | SIXTY(LabConstants.PasswordPolicyValidityPeriod.SIXTY); 27 | 28 | final String value; 29 | 30 | PasswordPolicyValidityPeriod(final String value) { 31 | this.value = value; 32 | } 33 | 34 | @Override 35 | public String toString() { 36 | return value; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /LabApiUtilities/src/main/com/microsoft/identity/labapi/utilities/constants/PublicClient.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.labapi.utilities.constants; 24 | 25 | public enum PublicClient { 26 | YES(LabConstants.PublicClient.YES), 27 | NO(LabConstants.PublicClient.NO); 28 | 29 | final String value; 30 | 31 | PublicClient(final String value) { 32 | this.value = value; 33 | } 34 | 35 | @Override 36 | public String toString() { 37 | return value; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LabApiUtilities/src/main/com/microsoft/identity/labapi/utilities/constants/TokenType.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.labapi.utilities.constants; 24 | 25 | public enum TokenType { 26 | ACCESS(LabConstants.TokenType.ACCESS); 27 | 28 | final String value; 29 | 30 | TokenType(final String value) { 31 | this.value = value; 32 | } 33 | 34 | @Override 35 | public String toString() { 36 | return value; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /LabApiUtilities/src/main/com/microsoft/identity/labapi/utilities/constants/UserRole.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.labapi.utilities.constants; 24 | 25 | public enum UserRole { 26 | NONE(LabConstants.UserRole.NONE), 27 | CLOUD_DEVICE_ADMINISTRATOR(LabConstants.UserRole.CLOUD_DEVICE_ADMINISTRATOR); 28 | 29 | final String value; 30 | 31 | UserRole(final String value) { 32 | this.value = value; 33 | } 34 | 35 | @Override 36 | public String toString() { 37 | return value; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LabApiUtilities/src/main/com/microsoft/identity/labapi/utilities/jwt/IJWTParserFactory.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.labapi.utilities.jwt; 24 | 25 | /** 26 | * A factory that can return an implementation of an {@link IJWTParser}. 27 | */ 28 | public interface IJWTParserFactory { 29 | 30 | /** 31 | * Obtain an instance of an {@link IJWTParser}. 32 | * 33 | * @return the JWT Parser to use. 34 | */ 35 | IJWTParser getJwtParser(); 36 | } 37 | -------------------------------------------------------------------------------- /azure-pipelines/auth-client/common-instrumented-tests.yml: -------------------------------------------------------------------------------- 1 | # File: azure-pipelines\auth-client\common-instrumented-test.yml 2 | # Description: Run common instrumented test. 3 | 4 | trigger: 5 | - dev 6 | 7 | resources: 8 | repositories: 9 | - repository: android-complete 10 | type: github 11 | name: AzureAD/android-complete 12 | ref: master 13 | endpoint: ANDROID_GITHUB 14 | 15 | jobs: 16 | - template: azure-pipelines/templates/run-instrumented-tests.yml@android-complete 17 | parameters: 18 | projectName: common 19 | -------------------------------------------------------------------------------- /azure-pipelines/pull-request-validation/common4j.yml: -------------------------------------------------------------------------------- 1 | # File: azure-pipelines\pull-request-validation\common4j.yml 2 | # Description: Run test in common4j 3 | # Variable: 'MOCK_API_URL' was defined in the Variables tab 4 | # Uses Java 11 5 | name: $(date:yyyyMMdd)$(rev:.r) 6 | trigger: none 7 | variables: 8 | - group: devex-ciam-test 9 | 10 | resources: 11 | repositories: 12 | - repository: self 13 | type: git 14 | ref: dev 15 | 16 | pool: 17 | name: Hosted Windows 2019 with VS2019 18 | 19 | jobs: 20 | - job: build_test 21 | displayName: Build & Test 22 | steps: 23 | - checkout: self 24 | clean: true 25 | submodules: recursive 26 | persistCredentials: True 27 | - template: ../templates/steps/automation-cert.yml 28 | - task: Gradle@1 29 | name: Gradle1 30 | displayName: Assembles the outputs of this project. 31 | inputs: 32 | cwd: $(Build.SourcesDirectory)/common-java-root 33 | tasks: clean common4j:assemble 34 | - template: ../templates/steps/spotbugs.yml 35 | parameters: 36 | project: common4j 37 | cwd: $(Build.SourcesDirectory)/common-java-root 38 | spotbugsCommand: spotbugsMain 39 | - task: Gradle@2 40 | displayName: Run the unit tests. 41 | inputs: 42 | cwd: $(Build.SourcesDirectory)/common-java-root 43 | tasks: common4j:test -Psugar=true -PmockApiUrl=$(MOCK_API_URL) 44 | ... 45 | -------------------------------------------------------------------------------- /azure-pipelines/pull-request-validation/lab-utilities.yml: -------------------------------------------------------------------------------- 1 | # File: azure-pipelines\pull-request-validation\lab-utilities.yml 2 | # Description: Run test in LabApiUtilities 3 | name: $(date:yyyyMMdd)$(rev:.r) 4 | 5 | trigger: none 6 | 7 | resources: 8 | repositories: 9 | - repository: self 10 | type: git 11 | ref: dev 12 | 13 | pool: 14 | name: Hosted Windows 2019 with VS2019 15 | 16 | variables: 17 | - group: MSIDLABVARS 18 | 19 | jobs: 20 | - job: Phase_1 21 | displayName: Phase 1 22 | steps: 23 | - checkout: self 24 | clean: true 25 | submodules: recursive 26 | persistCredentials: True 27 | - template: ../templates/steps/automation-cert.yml 28 | - task: Gradle@1 29 | name: Gradle1 30 | displayName: Assembles the outputs of this project. 31 | inputs: 32 | cwd: $(Build.SourcesDirectory)/common-java-root 33 | tasks: LabApiUtilities:clean LabApiUtilities:assemble 34 | - template: ../templates/steps/spotbugs.yml 35 | parameters: 36 | project: LabApiUtilities 37 | cwd: $(Build.SourcesDirectory)/common-java-root 38 | spotbugsCommand: spotbugsMain 39 | - task: Gradle@2 40 | displayName: Run the unit tests. 41 | inputs: 42 | cwd: $(Build.SourcesDirectory)/common-java-root 43 | tasks: LabApiUtilities:test -Psugar=true -PlabSecret=$(LabVaultAppCert) 44 | ... 45 | -------------------------------------------------------------------------------- /azure-pipelines/pull-request-validation/security-compliance-check-common.yml: -------------------------------------------------------------------------------- 1 | # File: azure-pipelines\pull-request-validation\security-compliance-check-common.yml 2 | # Description: Run Credscan and PoliCheck 3 | name: $(date:yyyyMMdd)$(rev:.r) 4 | 5 | trigger: 6 | branches: 7 | include: 8 | - dev 9 | - master 10 | - release/* 11 | batch: True 12 | 13 | jobs: 14 | - template: ../templates/steps/security-compliance-check.yml 15 | ... 16 | -------------------------------------------------------------------------------- /azure-pipelines/templates/steps/fetch-pr-labels.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - job: getLabelsJob 3 | displayName: Fetch PR Labels 4 | steps: 5 | - bash: | 6 | echo "Fetching labels from https://api.github.com/repos/$BUILD_REPOSITORY_ID/issues/$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER/labels" 7 | temp=$(curl -s "https://api.github.com/repos/$BUILD_REPOSITORY_ID/issues/$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER/labels" | jq -jc '.[] | {name}') 8 | echo -e "##vso[task.setvariable variable=prLabels;isOutput=true]$temp" 9 | echo "$temp" 10 | condition: eq(variables['Build.Reason'], 'PullRequest') 11 | name: fetchPrCILabel 12 | -------------------------------------------------------------------------------- /azure-pipelines/templates/steps/generate-sbom.yml: -------------------------------------------------------------------------------- 1 | # File: azure-pipelines\templates\steps\generate-sbom.yml 2 | # Description: Tasks to generate SBOM manifest file 3 | # Parameters: 4 | # 'project' name of the project to generate SBOM 5 | # 'buildDropPath' path to folder for project's build artifacts 6 | # 'configuration' gradle configuration to lock dependencies for 7 | # 'artifactName' artifact name to publish dependencies lockfile 8 | 9 | parameters: 10 | - name: project 11 | - name: buildDropPath 12 | - name: configuration 13 | - name: artifactName 14 | default: dependencies 15 | 16 | steps: 17 | - task: Gradle@3 18 | displayName: generate dependencies lockfile 19 | inputs: 20 | tasks: ${{ parameters.project }}:dependencies --configuration=${{ parameters.configuration }} --write-locks 21 | - task: ComponentGovernanceComponentDetection@0 22 | inputs: 23 | scanType: 'LogOnly' 24 | useDefaultDetectors: false 25 | detectorsToRun: 'Maven' 26 | verbosity: 'Verbose' 27 | sourceScanPath: $(Build.SourcesDirectory)/${{ parameters.project }} 28 | alertWarningLevel: 'High' 29 | - task: ManifestGeneratorTask@0 30 | displayName: 'Generate SBOM manifest file' 31 | inputs: 32 | BuildDropPath: ${{ parameters.buildDropPath }} 33 | - task: CopyFiles@2 34 | inputs: 35 | SourceFolder: '$(Build.SourcesDirectory)/${{ parameters.project }}' 36 | Contents: '**/*.lockfile' 37 | TargetFolder: '$(Build.SourcesDirectory)/${{ parameters.project }}/dependencies' 38 | OverWrite: true 39 | flattenFolders: false 40 | - task: PublishPipelineArtifact@1 41 | displayName: 'Publish Artifact: dependencies lockfile' 42 | inputs: 43 | targetPath: $(Build.SourcesDirectory)/${{ parameters.project }}/dependencies 44 | ArtifactName: ${{ parameters.artifactName }} 45 | -------------------------------------------------------------------------------- /azure-pipelines/templates/steps/security-compliance-check.yml: -------------------------------------------------------------------------------- 1 | # File: azure-pipelines\templates\steps\security-compliance-check.yml 2 | # https://docs.microsoft.com/en-us/azure/security/develop/yaml-configuration#credential-scanner-task 3 | # https://microsoft.sharepoint.com/sites/globalreadiness/SitePages/PoliCheck.aspx 4 | # https://docs.opensource.microsoft.com/tools/cg/index.html 5 | jobs: 6 | - job: credscan_policheck 7 | displayName: Run Credentials Scanner and Policheck 8 | cancelTimeoutInMinutes: 1 9 | pool: 10 | name: Hosted Windows 2019 with VS2019 11 | steps: 12 | - checkout: self 13 | clean: true 14 | submodules: recursive 15 | persistCredentials: True 16 | - task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@3 17 | displayName: 'Run Credential Scanner' 18 | inputs: 19 | debugMode: false 20 | - task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@2 21 | displayName: 'Run PoliCheck' 22 | inputs: 23 | targetType: F 24 | result: PoliCheck.xml 25 | optionsFC: 1 26 | optionsXS: 1 27 | optionsSEV: '1|2' 28 | optionsPE: '1|2|3|4' 29 | - task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@3 30 | displayName: 'Publish Security Analysis Logs' 31 | - task: ComponentGovernanceComponentDetection@0 32 | displayName: Component Detection 33 | -------------------------------------------------------------------------------- /azure-pipelines/templates/steps/spotbugs.yml: -------------------------------------------------------------------------------- 1 | # File: azure-pipelines\templates\steps\spotbugs.yml 2 | # Description: Tasks to run Spotbugs (Assemble task must run first) 3 | # https://github.com/AzureAD/android-complete/blob/master/plugins/buildsystem/docs/Spotbugs.md 4 | 5 | parameters: 6 | - name: project 7 | - name: spotbugsCommand 8 | default: spotbugsLocalDebug 9 | - name: artifactName 10 | default: CodeAnalysisLogs 11 | - name: cwd 12 | default: $(Build.SourcesDirectory) 13 | 14 | steps: 15 | - task: Gradle@3 16 | displayName: 'Run Spotbugs' 17 | inputs: 18 | javaHomeSelection: JDKVersion 19 | jdkVersionOption: "1.11" 20 | jdkArchitecture: x64 21 | cwd: ${{ parameters.cwd }} 22 | tasks: ${{ parameters.project }}:${{ parameters.spotbugsCommand }} 23 | publishJUnitResults: false 24 | - task: PublishPipelineArtifact@1 25 | displayName: 'Publish Artifact: SpotBugs' 26 | inputs: 27 | targetPath: '$(Build.SourcesDirectory)/${{ parameters.project }}/build/reports/spotbugs' 28 | ArtifactName: ${{ parameters.artifactName }} 29 | condition: failed() 30 | -------------------------------------------------------------------------------- /azure-pipelines/vsts-releases/common.yml: -------------------------------------------------------------------------------- 1 | # File: azure-pipelines\vsts-releases\common.yml 2 | # Description: Publish common to internal feed 3 | # https://identitydivision.visualstudio.com/Engineering/_packaging?_a=feed&feed=AndroidADAL 4 | # Variable: 'ENV_VSTS_MVN_ANDROIDCOMMON_USERNAME' was defined in the Variables tab 5 | # https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate 6 | name: $(date:yyyyMMdd)$(rev:.r) 7 | 8 | trigger: none 9 | pr: none 10 | 11 | resources: 12 | repositories: 13 | - repository: self 14 | type: git 15 | ref: master 16 | 17 | jobs: 18 | - template: ../templates/steps/vsts-release/vsts-release-template.yml 19 | parameters: 20 | project: common 21 | envVstsMvnAndroidAccessTokenVar: ENV_VSTS_MVN_ANDROIDCOMMON_ACCESSTOKEN 22 | assembleTask: assembleRelease 23 | publishTask: publish 24 | sbomConfiguration: distReleaseRuntimeClasspath 25 | -------------------------------------------------------------------------------- /azure-pipelines/vsts-releases/common4j.yml: -------------------------------------------------------------------------------- 1 | # File: azure-pipelines\vsts-releases\common4j.yml 2 | # Description: Publish common4j to internal feed 3 | # https://identitydivision.visualstudio.com/Engineering/_packaging?_a=package&feed=AndroidADAL&package=com.microsoft.identity%3Acommon4j&protocolType=maven 4 | # Variable: 'ENV_VSTS_MVN_ANDROIDCOMMON_USERNAME' was defined in the Variables tab 5 | # https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate 6 | name: $(date:yyyyMMdd)$(rev:.r) 7 | 8 | trigger: none 9 | pr: none 10 | 11 | resources: 12 | repositories: 13 | - repository: self 14 | type: git 15 | ref: master 16 | 17 | jobs: 18 | - template: ../templates/steps/vsts-release/vsts-release-template.yml 19 | parameters: 20 | project: common4j 21 | envVstsMvnAndroidAccessTokenVar: ENV_VSTS_MVN_ANDROIDCOMMON_ACCESSTOKEN 22 | assembleTask: assemble 23 | publishTask: publish 24 | sbomConfiguration: runtimeClasspath 25 | spotbugsCwdRoot: $(Build.SourcesDirectory)/common-java-root 26 | spotbugsCommand: spotbugsMain 27 | -------------------------------------------------------------------------------- /common-java-root/gradle.properties: -------------------------------------------------------------------------------- 1 | ariaTenantTokenProd="b6618d4b5d24466a9d2d0d8cde8cd6e4-ddcec952-23e9-4765-b4fb-f823ec69c6e3-7966" 2 | ariaTenantTokenTest="1e8435186fa849b28b1a402fb5074ff1-0b91a9ec-efad-440c-b92c-ac4cb55ba0ff-7490" 3 | 4 | android.useAndroidX=true 5 | android.enableJetifier=true 6 | 7 | # https://office.visualstudio.com/Outlook%20Mobile/_wiki/wikis/Outlook-Mobile.wiki/3780/Android-Studio-Gradle-Performance-tips-and-tricks 8 | org.gradle.parallel=true 9 | org.gradle.daemon=true 10 | 11 | # See https://stackoverflow.com/questions/56075455/expiring-daemon-because-jvm-heap-space-is-exhausted 12 | # we must make sure that the total size is <7G, as that's the RAM size of VM on the build pipeline. 13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError 14 | 15 | # This the TSL versionName... 16 | versionName=1.5.9 17 | 18 | # For OneAuth default abiSelection 19 | abiSelection=x86_64 20 | 21 | # Until we want to give it teeth 22 | org.gradle.dependency.verification=off 23 | -------------------------------------------------------------------------------- /common-java-root/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AzureAD/microsoft-authentication-library-common-for-android/b90b5caeac3491a66f318c4f5015bbbdeb942267/common-java-root/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /common-java-root/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /common-java-root/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | gradlePluginPortal() 6 | } 7 | } 8 | 9 | rootProject.name = "com.microsoft.identity.java" 10 | 11 | // Pure Java Projects 12 | include(':common4j') 13 | project(':common4j').projectDir = new File('../common4j') 14 | 15 | include(':keyvault') 16 | project(':keyvault').projectDir = new File('../keyvault') 17 | 18 | include(':labapi') 19 | project(':labapi').projectDir = new File('../labapi') 20 | 21 | include(':LabApiUtilities') 22 | project(':LabApiUtilities').projectDir = new File('../LabApiUtilities') 23 | -------------------------------------------------------------------------------- /common/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /common/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Users\brianmel\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | 27 | #For Android Credential Manager: https://developer.android.com/training/sign-in/passkeys#proguard 28 | -if class androidx.credentials.CredentialManager 29 | -keep class androidx.credentials.playservices.** { 30 | *; 31 | } 32 | -------------------------------------------------------------------------------- /common/src/androidTest/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /common/src/androidTest/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AzureAD/microsoft-authentication-library-common-for-android/b90b5caeac3491a66f318c4f5015bbbdeb942267/common/src/androidTest/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /common/src/androidTest/res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AzureAD/microsoft-authentication-library-common-for-android/b90b5caeac3491a66f318c4f5015bbbdeb942267/common/src/androidTest/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /common/src/androidTest/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AzureAD/microsoft-authentication-library-common-for-android/b90b5caeac3491a66f318c4f5015bbbdeb942267/common/src/androidTest/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /common/src/androidTest/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AzureAD/microsoft-authentication-library-common-for-android/b90b5caeac3491a66f318c4f5015bbbdeb942267/common/src/androidTest/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /common/src/androidTest/res/values-de/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Test:Die Authority konnte nicht bestätigt werden. 5 | 6 | -------------------------------------------------------------------------------- /common/src/androidTest/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Com.microsoft.adal.testsTest 5 | MockActivity 6 | Settings 7 | Hello world! 8 | Test:Authority validation returned an error 9 | 10 | -------------------------------------------------------------------------------- /common/src/androidTest/resources/jacoco-agent.properties: -------------------------------------------------------------------------------- 1 | output=none -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/adal/internal/net/IConnectionService.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.adal.internal.net; 24 | 25 | /** 26 | * exposed interface for testing. 27 | */ 28 | public interface IConnectionService { 29 | 30 | /** 31 | * Gets status for connection status. 32 | * 33 | * @return connection status. 34 | */ 35 | boolean isConnectionAvailable(); 36 | } 37 | -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/authorities/UnknownAudience.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.internal.authorities; 24 | 25 | import com.microsoft.identity.common.java.authorities.AzureActiveDirectoryAudience; 26 | 27 | public class UnknownAudience extends AzureActiveDirectoryAudience { 28 | } 29 | -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/broker/ipc/IContentProviderStatusLoader.kt: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.internal.broker.ipc 24 | 25 | /** 26 | * A wrapper interface around packageManager.queryContentProviders(). 27 | * */ 28 | interface IContentProviderStatusLoader { 29 | 30 | /** 31 | * Determine if the targeted app supports (Broker) Content Provider. 32 | **/ 33 | fun supportsContentProvider(packageName: String) : Boolean 34 | } 35 | -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/cache/IClientActiveBrokerCache.kt: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.internal.cache 24 | 25 | /** 26 | * An extension of [IActiveBrokerCache]. 27 | * */ 28 | interface IClientActiveBrokerCache: IActiveBrokerCache { 29 | } -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/commands/Command.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.internal.commands; 24 | 25 | import com.microsoft.identity.common.java.controllers.BaseController; 26 | 27 | public interface Command { 28 | T execute() throws Exception; 29 | 30 | boolean isEligibleForEstsTelemetry(); 31 | 32 | BaseController getDefaultController(); 33 | 34 | boolean isEligibleForCaching(); 35 | } 36 | -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/logging/IRequestContext.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.internal.logging; 24 | 25 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 26 | 27 | @SuppressFBWarnings("NM_SAME_SIMPLE_NAME_AS_INTERFACE") 28 | @Deprecated 29 | public interface IRequestContext extends com.microsoft.identity.common.java.logging.IRequestContext { 30 | // Class exists for backcompat 31 | } 32 | -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/msafederation/IMsaFederatedSignInProvider.kt: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.internal.msafederation 24 | 25 | /** 26 | * Internal interface for Federated Sign In Providers. 27 | */ 28 | internal interface IMsaFederatedSignInProvider { 29 | suspend fun signIn(): Result 30 | suspend fun signOut() 31 | } 32 | -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/msafederation/MsaFederatedSignInParameters.kt: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.internal.msafederation 24 | 25 | /** 26 | * Parameters for Federated Sign In. e.g. SignInWithGoogleParameters for Google. 27 | */ 28 | abstract class MsaFederatedSignInParameters { 29 | abstract val providerName: MsaFederatedSignInProviderName 30 | } 31 | -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/platform/SymmetricKey.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.internal.platform; 24 | 25 | /** 26 | * Marker interface for symmetric key implementations. All of the standard operations that are supported 27 | * are contained in the {@link Key} interface. 28 | */ 29 | public interface SymmetricKey extends Key { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/providers/microsoft/activedirectoryfederationservices/ActiveDirectoryFederationServicesTokenResponse.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.internal.providers.microsoft.activedirectoryfederationservices; 24 | 25 | import com.microsoft.identity.common.java.providers.oauth2.TokenResponse; 26 | 27 | /** 28 | * Active Directory Federation Service Token Response. 29 | */ 30 | public class ActiveDirectoryFederationServicesTokenResponse extends TokenResponse { 31 | } 32 | -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/providers/microsoft/azureactivedirectoryb2c/AzureActiveDirectoryB2CTokenResponse.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.internal.providers.microsoft.azureactivedirectoryb2c; 24 | 25 | import com.microsoft.identity.common.java.providers.oauth2.TokenResponse; 26 | 27 | /** 28 | * The Azure Active Directory B2C Token Response. 29 | */ 30 | public class AzureActiveDirectoryB2CTokenResponse extends TokenResponse { 31 | } 32 | -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/providers/oauth2/ResponseType.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.identity.common.internal.providers.oauth2; 2 | 3 | /** 4 | * The response type values defined by the 5 | * [OAuth 2.0](https://tools.ietf.org/html/rfc6749) and 6 | * [OpenID Connect Core 1.0](http://openid.net/specs/openid-connect-core-1_0.html) 7 | **/ 8 | 9 | public final class ResponseType { 10 | /** 11 | * For requesting an authorization code. 12 | * 13 | * @see "The OAuth 2.0 Authorization Framework (RFC 6749), Section 3.1.1 14 | * " 15 | */ 16 | public static final String CODE = "code"; 17 | 18 | /** 19 | * For requesting an access token via an implicit grant. 20 | * 21 | * @see "The OAuth 2.0 Authorization Framework (RFC 6749), Section 3.1.1 22 | * " 23 | */ 24 | public static final String TOKEN = "token"; 25 | 26 | /** 27 | * For requesting an OpenID Conenct ID Token. 28 | * 29 | * @see "The OAuth 2.0 Authorization Framework (RFC 6749), Section 3.1.1 30 | * " 31 | */ 32 | public static final String ID_TOKEN = "id_token"; 33 | } 34 | -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/telemetry/TelemetryEventStrings.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.identity.common.internal.telemetry; 2 | 3 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 4 | 5 | /** 6 | * This class is deprecated 7 | * 8 | * @see com.microsoft.identity.common.java.telemetry.TelemetryEventStrings 9 | * */ 10 | @Deprecated 11 | @SuppressFBWarnings("NM_SAME_SIMPLE_NAME_AS_SUPERCLASS") 12 | public class TelemetryEventStrings extends com.microsoft.identity.common.java.telemetry.TelemetryEventStrings { 13 | } 14 | -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/telemetry/events/ApiEndEvent.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.internal.telemetry.events; 24 | 25 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 26 | 27 | /** 28 | * Deprecated. Use {@link com.microsoft.identity.common.java.telemetry.events.ApiEndEvent} instead. 29 | **/ 30 | @SuppressFBWarnings("NM_SAME_SIMPLE_NAME_AS_SUPERCLASS") 31 | @Deprecated 32 | public class ApiEndEvent extends com.microsoft.identity.common.java.telemetry.events.ApiEndEvent { 33 | } 34 | -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/telemetry/events/ApiStartEvent.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.internal.telemetry.events; 24 | 25 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 26 | 27 | /** 28 | * Deprecated. Use {@link com.microsoft.identity.common.java.telemetry.events.ApiStartEvent} instead. 29 | **/ 30 | @SuppressFBWarnings("NM_SAME_SIMPLE_NAME_AS_SUPERCLASS") 31 | @Deprecated 32 | public class ApiStartEvent extends com.microsoft.identity.common.java.telemetry.events.ApiStartEvent { 33 | } -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/ui/webview/ISendResultCallback.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.internal.ui.webview; 24 | 25 | /** 26 | * Should send a form of a result when invoked. 27 | */ 28 | public interface ISendResultCallback { 29 | 30 | /** 31 | * Runs logic that sends a form of a result. 32 | */ 33 | void onResultReady(); 34 | } 35 | -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/ui/webview/OnPageLoadedCallback.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.internal.ui.webview; 24 | 25 | public interface OnPageLoadedCallback { 26 | void onPageLoaded(final String url); 27 | } 28 | -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/ui/webview/certbasedauth/ICancelCbaCallback.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.internal.ui.webview.certbasedauth; 24 | 25 | /** 26 | * Callback interface for when CBA is being cancelled. 27 | */ 28 | public interface ICancelCbaCallback { 29 | /** 30 | * Method to be invoked upon a user cancelling out of CBA. 31 | */ 32 | void onCancel(); 33 | } 34 | -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/ui/webview/certbasedauth/IConnectionCallback.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.internal.ui.webview.certbasedauth; 24 | 25 | /** 26 | * Callback methods to be run upon initial connection of a smartcard device. 27 | */ 28 | public interface IConnectionCallback { 29 | /** 30 | * Logic to be run upon initial connection of a smartcard device. 31 | */ 32 | void onCreateConnection(); 33 | } 34 | -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/ui/webview/certbasedauth/IDisconnectionCallback.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.internal.ui.webview.certbasedauth; 24 | 25 | /** 26 | * Callback methods to be run upon initial disconnection of a smartcard device. 27 | */ 28 | public interface IDisconnectionCallback { 29 | /** 30 | * Logic to be run upon disconnection of a smartcard device. 31 | */ 32 | void onClosedConnection(); 33 | } 34 | -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/ui/webview/certbasedauth/IDismissCallback.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.internal.ui.webview.certbasedauth; 24 | 25 | /** 26 | * Callback interface for when dialog is to be dismissed 27 | * (usually by positive button click,back button, or by an expected user interaction). 28 | */ 29 | public interface IDismissCallback { 30 | /** 31 | * Action that prompts dismissal. 32 | */ 33 | void onDismiss(); 34 | } 35 | -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/util/FindBugsConstants.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.internal.util; 24 | 25 | public class FindBugsConstants { 26 | public final static String NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE = "NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"; 27 | } 28 | -------------------------------------------------------------------------------- /common/src/main/java/com/microsoft/identity/common/internal/util/TriFunction.java: -------------------------------------------------------------------------------- 1 | // Permission is hereby granted, free of charge, to any person obtaining a copy 2 | // of this software and associated documentation files(the "Software"), to deal 3 | // in the Software without restriction, including without limitation the rights 4 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 5 | // copies of the Software, and to permit persons to whom the Software is 6 | // furnished to do so, subject to the following conditions : 7 | // 8 | // The above copyright notice and this permission notice shall be included in 9 | // all copies or substantial portions of the Software. 10 | // 11 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 12 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 13 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 14 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 15 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 17 | // THE SOFTWARE. 18 | package com.microsoft.identity.common.internal.util; 19 | 20 | /** 21 | * This interface represents a 3-valued function. 22 | * @param The type of param 1. 23 | * @param The type of param 2. 24 | * @param The type of param 3. 25 | * @param The type of param 4. 26 | */ 27 | public interface TriFunction { 28 | /** 29 | * @param x parameter 1. 30 | * @param y parameter 2. 31 | * @param z parameter 3. 32 | * @return a U. 33 | */ 34 | U apply(X x, Y y, Z z); 35 | } 36 | -------------------------------------------------------------------------------- /common/src/main/res/drawable/cursor_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /common/src/main/res/layout/common_activity_authentication.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 16 | 17 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /common/src/main/res/layout/dual_screen_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 17 | 18 | 23 | 24 | 30 | 31 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /common/src/main/res/layout/http_auth_dialog.xml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 18 | 19 | 20 | 21 | 22 | 31 | 32 | -------------------------------------------------------------------------------- /common/src/main/res/layout/nfc_loading_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 13 | -------------------------------------------------------------------------------- /common/src/main/res/layout/pin_textview_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 22 | 27 | 28 | -------------------------------------------------------------------------------- /common/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #0078D4 4 | 5 | #0078D4 6 | #919191 7 | #212121 8 | #0078D4 9 | #0078D4 10 | #0078D4 11 | #616161 12 | #212121 13 | #D92C2C 14 | 15 | -------------------------------------------------------------------------------- /common/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10dp 4 | 10dp 5 | 10dp 6 | 20dp 7 | -------------------------------------------------------------------------------- /common/src/test/java/com/microsoft/identity/common/internal/ui/webview/certbasedauth/TestDialog.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.internal.ui.webview.certbasedauth; 24 | 25 | enum TestDialog { 26 | cert_picker, 27 | pin, 28 | error, 29 | user_choice, 30 | prompt, 31 | nfc_loading, 32 | nfc_prompt, 33 | nfc_reminder, 34 | removal_prompt 35 | } 36 | -------------------------------------------------------------------------------- /common/src/test/java/com/microsoft/identity/common/internal/util/ArgumentCaptorUtils.kt: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.internal.util 24 | 25 | import org.mockito.ArgumentCaptor 26 | 27 | /** 28 | * Calls the capture method method on the supplied argument. 29 | */ 30 | fun capture(argumentCaptor: ArgumentCaptor): T = argumentCaptor.capture() 31 | -------------------------------------------------------------------------------- /common/src/test/java/com/microsoft/identity/common/unit/AuthenticationConstantsTest.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.identity.common.unit; 2 | 3 | import com.microsoft.identity.common.adal.internal.AuthenticationConstants; 4 | 5 | import org.junit.Assert; 6 | import org.junit.Test; 7 | 8 | public class AuthenticationConstantsTest { 9 | @Test 10 | public void testComputeMaxBrokerHostVersion() { 11 | Assert.assertEquals("5.0", AuthenticationConstants.Broker.computeMaxHostBrokerProtocol()); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /common4j/.gitattributes: -------------------------------------------------------------------------------- 1 | # 2 | # https://help.github.com/articles/dealing-with-line-endings/ 3 | # 4 | # These are explicitly windows files and should use crlf 5 | *.bat text eol=crlf 6 | 7 | -------------------------------------------------------------------------------- /common4j/.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the ART/Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # VSCode project file. 12 | .project 13 | .classpath 14 | .settings 15 | 16 | # Generated files 17 | bin/ 18 | gen/ 19 | out/ 20 | 21 | # Gradle files 22 | .gradle/ 23 | build/ 24 | 25 | # Local configuration file (sdk path, etc) 26 | local.properties 27 | 28 | # Proguard folder generated by Eclipse 29 | proguard/ 30 | 31 | # Log Files 32 | *.log 33 | 34 | # Android Studio Navigation editor temp files 35 | .navigation/ 36 | 37 | # Android Studio captures folder 38 | captures/ 39 | 40 | # IntelliJ 41 | *.iml 42 | .idea 43 | 44 | # Keystore files 45 | # Uncomment the following line if you do not want to check your keystore files in. 46 | #*.jks 47 | 48 | # External native build folder generated in Android Studio 2.2 and later 49 | .externalNativeBuild 50 | 51 | # Google Services (e.g. APIs or Firebase) 52 | google-services.json 53 | 54 | # Freeline 55 | freeline.py 56 | freeline/ 57 | freeline_project_description.json 58 | 59 | # Ignore poms 60 | *.pom 61 | 62 | # General 63 | .DS_Store 64 | .AppleDouble 65 | .LSOverride 66 | 67 | # Icon must end with two \r 68 | Icon 69 | 70 | # Thumbnails 71 | ._* 72 | 73 | # Files that might appear in the root of a volume 74 | .DocumentRevisions-V100 75 | .fseventsd 76 | .Spotlight-V100 77 | .TemporaryItems 78 | .Trashes 79 | .VolumeIcon.icns 80 | .com.apple.timemachine.donotpresent 81 | 82 | # Directories potentially created on remote AFP share 83 | .AppleDB 84 | .AppleDesktop 85 | Network Trash Folder 86 | Temporary Items 87 | .apdisk 88 | 89 | # gradle stuffs 90 | gradlew 91 | gradlew.bat 92 | gradle-wrapper.jar 93 | -------------------------------------------------------------------------------- /common4j/changes.md: -------------------------------------------------------------------------------- 1 | ### Common to Common4j migration. 2 | 3 | - If a class that you're consuming from package `com.microsoft.identity.common` is not found, look for one in `com.microsoft.identity.common.java` 4 | - The class *might* have a new, abstracted, interface. This document will keep track of what to do in order to consume those interfaces. -------------------------------------------------------------------------------- /common4j/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /common4j/settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * This file was generated by the Gradle 'init' task. 3 | * 4 | * The settings file is used to specify which projects to include in your build. 5 | * 6 | * Detailed information about configuring a multi-project build in Gradle can be found 7 | * in the user manual at https://docs.gradle.org/6.8.3/userguide/multi_project_builds.html 8 | */ 9 | 10 | pluginManagement { 11 | repositories { 12 | mavenLocal() 13 | google() 14 | mavenCentral() 15 | gradlePluginPortal() 16 | } 17 | } 18 | 19 | rootProject.name = 'common4j' 20 | include('lib') 21 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/WarningType.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java; 24 | 25 | /** 26 | * Class to hold names of compile time warning types. 27 | */ 28 | public class WarningType { 29 | public static final String rawtype_warning = "rawtypes"; 30 | public static final String unchecked_warning = "unchecked"; 31 | public static final String deprecation_warning = "deprecation"; 32 | public static final String NewApi = "NewApi"; 33 | } 34 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/authorities/Environment.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.authorities; 24 | 25 | public enum Environment { 26 | PreProduction, 27 | Production, 28 | OneBox // local ests setup 29 | } 30 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/authscheme/INameable.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.authscheme; 24 | 25 | import java.io.Serializable; 26 | 27 | /** 28 | * Interface representation of a nameable entity. 29 | */ 30 | public interface INameable extends Serializable { 31 | 32 | /** 33 | * Gets the name. 34 | * 35 | * @return The name to get. 36 | */ 37 | String getName(); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/authscheme/INonced.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.authscheme; 24 | 25 | import java.io.Serializable; 26 | 27 | /** 28 | * Interface representation of an entity which can carry a nonce value. 29 | */ 30 | public interface INonced extends Serializable { 31 | 32 | /** 33 | * Gets the nonce. 34 | * 35 | * @return The nonce to get. 36 | */ 37 | String getNonce(); 38 | } 39 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/broker/IBrokerAccount.kt: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.broker; 24 | 25 | interface IBrokerAccount { 26 | 27 | /** 28 | * Get account's (unique) username. 29 | */ 30 | fun getUsername(): String 31 | 32 | /** 33 | * Get account's type. 34 | */ 35 | fun getType(): String 36 | } -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/cache/IListTypeToken.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.cache; 24 | 25 | import java.lang.reflect.Type; 26 | 27 | /** 28 | * Interface returning {@link Type} tokens for serialization hints to Gson. 29 | */ 30 | public interface IListTypeToken { 31 | 32 | /** 33 | * Gets the Type token associated with a List. 34 | * 35 | * @return The {@link Type}. 36 | */ 37 | Type getListTypeToken(); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/commands/CommandCallback.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.commands; 24 | 25 | import com.microsoft.identity.common.java.util.TaskCompletedCallbackWithError; 26 | 27 | public interface CommandCallback extends TaskCompletedCallbackWithError { 28 | void onCancel(); 29 | } 30 | 31 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/commands/EmptyCommandCallback.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.commands; 24 | 25 | /** 26 | * A command callback that does nothing. 27 | */ 28 | public class EmptyCommandCallback implements CommandCallback{ 29 | @Override 30 | public void onCancel() { 31 | } 32 | 33 | @Override 34 | public void onTaskCompleted(T t) { 35 | } 36 | 37 | @Override 38 | public void onError(U error) { 39 | } 40 | } -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/crypto/Algorithm.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.crypto; 24 | 25 | /** 26 | * Marker interface for crypto algorithm names. 27 | */ 28 | public interface Algorithm { 29 | /** 30 | * @return the standard algorithm name; 31 | */ 32 | String name(); 33 | } 34 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/dto/AadDeviceIdRecord.kt: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.dto 24 | 25 | import com.google.gson.annotations.SerializedName 26 | 27 | /** 28 | * A data class representing the device ID record. It's returned by the broker 29 | * in response to the Get AAD Device Id request for resource accounts. 30 | */ 31 | class AadDeviceIdRecord(@SerializedName("tenant_id") val tenantId: String, 32 | @SerializedName("device_id") val deviceId: String) 33 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/eststelemetry/ICurrentTelemetry.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | package com.microsoft.identity.common.java.eststelemetry; 25 | 26 | import lombok.NonNull; 27 | 28 | public interface ICurrentTelemetry { 29 | 30 | /** 31 | * Capture telemetry for current request 32 | * 33 | * @param key The key supplied for telemetry 34 | * @param value The value for the supplied key 35 | */ 36 | void put(@NonNull final String key, @NonNull final String value); 37 | } 38 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/exception/IrrecoverableDcfException.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.exception; 24 | 25 | public class IrrecoverableDcfException extends BaseException { 26 | 27 | public IrrecoverableDcfException(final String errorCode, final String errorMessage, final Throwable throwable) { 28 | super(errorCode, errorMessage, throwable); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/flighting/IFlightConfig.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.flighting; 24 | 25 | /** 26 | * Interface for defining a Flight 27 | */ 28 | public interface IFlightConfig { 29 | String getKey(); 30 | Object getDefaultValue(); 31 | } 32 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/logging/IRequestContext.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.logging; 24 | 25 | import java.util.Map; 26 | 27 | public interface IRequestContext extends Map { 28 | 29 | /** 30 | * Get the JSON String for the request context. 31 | * 32 | * @return String 33 | */ 34 | String toJsonString(); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/nativeauth/providers/responses/ApiResult.kt: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.nativeauth.providers.responses 24 | 25 | import com.microsoft.identity.common.java.nativeauth.util.ILoggable 26 | 27 | /** 28 | * Base class to encapsulate Native Auth API responses 29 | */ 30 | interface ApiResult: ILoggable { 31 | val correlationId: String 32 | } 33 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/nativeauth/providers/responses/signin/AuthenticationMethodApiResult.kt: -------------------------------------------------------------------------------- 1 | package com.microsoft.identity.common.java.nativeauth.providers.responses.signin 2 | 3 | import com.google.gson.annotations.Expose 4 | import com.google.gson.annotations.SerializedName 5 | import com.microsoft.identity.common.java.nativeauth.util.ILoggable 6 | 7 | data class AuthenticationMethodApiResult( 8 | @Expose @SerializedName("id") val id: String, 9 | @Expose @SerializedName("challenge_type") val challengeType: String, 10 | @SerializedName("login_hint") val loginHint: String, 11 | @Expose @SerializedName("challenge_channel") val challengeChannel: String, 12 | ) : ILoggable { 13 | override fun toUnsanitizedString() = "AuthenticationMethod(id=$id, " + 14 | "challenge_type=$challengeType, login_hint=$loginHint, " + 15 | "challenge_channel=$challengeChannel)" 16 | 17 | override fun toString()= "AuthenticationMethod(id=$id, challenge_channel=$challengeChannel)" 18 | } -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/nativeauth/util/ILoggable.kt: -------------------------------------------------------------------------------- 1 | package com.microsoft.identity.common.java.nativeauth.util 2 | 3 | import lombok.NonNull 4 | 5 | interface ILoggable { 6 | /** 7 | * This method produces a String that may contain PII (PII = Personally identifiable information). 8 | * The value of containsPii() will indicate whether the value actually contains PII. 9 | */ 10 | @NonNull 11 | fun toUnsanitizedString(): String 12 | 13 | /** 14 | * This method indicates whether the implementing class contains data fields that are considered 15 | * PII (Personally identifiable information). If this method returns true, then the value of 16 | * toSafeString(true) will return a String that contains PII. 17 | */ 18 | fun containsPii(): Boolean = toString() != toUnsanitizedString() 19 | 20 | /** 21 | * While we can't enforce this method to be overwritten, the intention is that every class that 22 | * implements this interface, also implements this method. This method will return a PII-safe 23 | * String, i.e. any PII is not included. 24 | */ 25 | @NonNull 26 | override fun toString(): String 27 | } 28 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/nativeauth/util/ListUtils.kt: -------------------------------------------------------------------------------- 1 | package com.microsoft.identity.common.java.nativeauth.util 2 | 3 | internal fun List.toUnsanitizedString(): String = 4 | this.joinToString(", ") { it.toUnsanitizedString() } 5 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/opentelemetry/CertBasedAuthChoice.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.opentelemetry; 24 | 25 | /** 26 | * Enumerates a user's intended choice during CertBasedAuth. 27 | */ 28 | public enum CertBasedAuthChoice { 29 | ON_DEVICE_CHOICE, 30 | SMARTCARD_CHOICE, 31 | NON_APPLICABLE 32 | } 33 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/opentelemetry/CryptoFactoryName.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.opentelemetry; 24 | 25 | /** 26 | * Enum representing classes implementing {@link com.microsoft.identity.common.java.crypto.ICryptoFactory}. 27 | */ 28 | public enum CryptoFactoryName { 29 | DefaultCryptoFactory, 30 | NonFipsBrokerCryptoFactory, 31 | AndroidBrokerFipsCryptoFactory, 32 | AndroidKeyStoreCryptoFactory 33 | } 34 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/opentelemetry/CryptoObjectName.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.opentelemetry; 24 | 25 | /** 26 | * All the operations/methods provided by CryptoFactory 27 | * Used as SpanName in OpenTelemetry 28 | * */ 29 | public enum CryptoObjectName { 30 | Signature, 31 | Cipher, 32 | Mac, 33 | KeyPairGenerator, 34 | KeyFactory, 35 | JcaContentSigner, 36 | } 37 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/opentelemetry/ICryptoOperation.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.opentelemetry; 24 | 25 | import com.microsoft.identity.common.java.exception.ClientException; 26 | 27 | /** 28 | * An interface representing a crypto operation to be performed. 29 | * Used with {@link CryptoFactoryTelemetryHelper} 30 | * */ 31 | public interface ICryptoOperation { 32 | T perform() throws ClientException; 33 | } 34 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/providers/microsoft/azureactivedirectory/AzureActiveDirectoryEnvironment.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.identity.common.java.providers.microsoft.azureactivedirectory; 2 | 3 | public class AzureActiveDirectoryEnvironment { 4 | public static final String PRODUCTION_CLOUD_URL = "https://login.microsoftonline.com"; //Prod 5 | public static final String PREPRODUCTION_CLOUD_URL = "https://login.windows-ppe.net"; //PPE 6 | 7 | public static final String ONEBOX_AUTHORITY = "zurich.test.dnsdemo1.test:8478"; 8 | public static final String ONEBOX_CLOUD_URL = "https://" + ONEBOX_AUTHORITY; // Local ESTS Deployment 9 | } 10 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/providers/oauth2/IErrorResponse.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.providers.oauth2; 24 | 25 | public interface IErrorResponse { 26 | 27 | String getError(); 28 | String getErrorDescription(); 29 | } 30 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/providers/oauth2/IResult.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.providers.oauth2; 24 | 25 | public interface IResult { 26 | 27 | boolean getSuccess(); 28 | IErrorResponse getErrorResponse(); 29 | ISuccessResponse getSuccessResponse(); 30 | } 31 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/providers/oauth2/ISuccessResponse.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.providers.oauth2; 24 | 25 | import com.microsoft.identity.common.java.commands.parameters.IHasExtraParameters; 26 | 27 | public interface ISuccessResponse extends IHasExtraParameters { 28 | } 29 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/providers/oauth2/OAuth2Configuration.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.providers.oauth2; 24 | 25 | /** 26 | * Configuration class for OAuth2Settings 27 | * Settings include things like: 28 | * - The address of the OIDC meta data document 29 | * - Whether or not to validate the issuer/host 30 | * - The issuer value to use 31 | * - The scopes supported by the oAuth provider 32 | * - etc... 33 | */ 34 | public class OAuth2Configuration { 35 | } 36 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/request/BrokerRequestType.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.identity.common.java.request; 2 | 3 | public enum BrokerRequestType { 4 | 5 | /** 6 | * Request type indicates regular acquire token request from adal or msal, Default value. 7 | */ 8 | REGULAR, 9 | 10 | /** 11 | * Request type indicates a token request to get Broker Refresh Token while doing WPJ. 12 | */ 13 | BROKER_RT_REQUEST, 14 | 15 | /** 16 | * Request type indicates a token request which is performed during an interrupt flow. 17 | */ 18 | RESOLVE_INTERRUPT 19 | 20 | } 21 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/result/VoidResult.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.result; 24 | 25 | /* 26 | Null Object Pattern for Commands who's result should be ignored. 27 | */ 28 | public class VoidResult { 29 | } 30 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/telemetry/ITelemetryAccessor.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.telemetry; 24 | 25 | import java.util.List; 26 | import java.util.Map; 27 | 28 | /** 29 | * An interface describing a telemetry accessor i.e. anyone that has the ability to return a 30 | * telemetry object. 31 | */ 32 | @Deprecated 33 | public interface ITelemetryAccessor { 34 | 35 | /** 36 | * Obtain telemetry data. 37 | */ 38 | List> getTelemetry(); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/telemetry/ITelemetryCallback.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | package com.microsoft.identity.common.java.telemetry; 25 | 26 | /** 27 | * Temporary interface. 28 | * For injecting telemetry into common (until broker's telemetry is properly wired up). 29 | * */ 30 | @Deprecated 31 | public interface ITelemetryCallback { 32 | void logEvent(final String operation, final Boolean isFailed, final String reason); 33 | } 34 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/telemetry/adapter/ITelemetryAdapter.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.telemetry.adapter; 24 | 25 | @Deprecated 26 | public interface ITelemetryAdapter { 27 | //Future extensibility void process(T observable, Rule rule); 28 | void process(T observable); 29 | } 30 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/telemetry/observers/IBrokerTelemetryObserver.java: -------------------------------------------------------------------------------- 1 | 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.telemetry.observers; 24 | 25 | @Deprecated 26 | public interface IBrokerTelemetryObserver extends ITelemetryAggregatedObserver { 27 | } 28 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/telemetry/observers/ITelemetryDefaultObserver.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.telemetry.observers; 24 | 25 | import java.util.List; 26 | import java.util.Map; 27 | 28 | /** 29 | * The default telemetry observer interface which upload raw telemetry data. 30 | */ 31 | @Deprecated 32 | public interface ITelemetryDefaultObserver extends ITelemetryObserver>> { 33 | @Override 34 | void onReceived(List> telemetryData); 35 | } -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/telemetry/observers/ITelemetryObserver.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.telemetry.observers; 24 | 25 | /** 26 | * The interface function for apps to override if they want to get the Telemetry. 27 | */ 28 | @Deprecated 29 | public interface ITelemetryObserver { 30 | 31 | /** 32 | * Invoked when telemetry data is received. 33 | * 34 | * @param telemetryData telemetry data 35 | */ 36 | void onReceived(T telemetryData); 37 | } 38 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/ui/AuthorizationAgent.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.ui; 24 | 25 | public enum AuthorizationAgent { 26 | DEFAULT, 27 | WEBVIEW, 28 | BROWSER 29 | } 30 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/util/CachedData.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.util; 24 | 25 | import lombok.Getter; 26 | import lombok.Setter; 27 | import lombok.experimental.Accessors; 28 | 29 | /** 30 | * An in-memory storage for caching the data. 31 | */ 32 | @Getter 33 | @Setter 34 | @Accessors(prefix = "m") 35 | public abstract class CachedData { 36 | 37 | private T mData; 38 | 39 | public void clear(){ 40 | mData = null; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/util/Supplier.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.util; 24 | 25 | /** 26 | * Represents an operation that returns a result, taking no arguments. 27 | * 28 | * @param the type of argument returned. 29 | */ 30 | public interface Supplier { 31 | /** 32 | * @return a instance of a T. 33 | */ 34 | T get(); 35 | } 36 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/util/TaskCompletedCallback.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | package com.microsoft.identity.common.java.util; 25 | 26 | public interface TaskCompletedCallback { 27 | void onTaskCompleted(T t); 28 | } 29 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/util/TaskCompletedCallbackWithError.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.util; 24 | 25 | public interface TaskCompletedCallbackWithError extends TaskCompletedCallback { 26 | void onError(U error); 27 | } 28 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/util/ported/Consumer.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.util.ported; 24 | 25 | /** 26 | * Ported from {@link java.util.function.Consumer} 27 | */ 28 | public interface Consumer { 29 | 30 | /** 31 | * Performs this operation on the given argument. 32 | * 33 | * @param t the input argument 34 | */ 35 | void accept(T t); 36 | } 37 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/util/ported/Function.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.util.ported; 24 | 25 | /** 26 | * Ported from {@link java.util.function.Function} 27 | */ 28 | public interface Function { 29 | /** 30 | * Applies this function to the given argument. 31 | * @param t the function argument 32 | * @return the function result 33 | */ 34 | R apply(T t); 35 | } 36 | -------------------------------------------------------------------------------- /common4j/src/main/com/microsoft/identity/common/java/util/ported/Supplier.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common.java.util.ported; 24 | 25 | /** 26 | * A functional interface modeled off of java.util.function.Supplier for providing 27 | * values to callers. 28 | * @param the type of value provided. 29 | */ 30 | public interface Supplier { 31 | /** 32 | * @return an instance of a T.x 33 | */ 34 | T get(); 35 | } 36 | -------------------------------------------------------------------------------- /common4j/src/test/com/microsoft/identity/common/java/eststelemetry/MockCommandResult.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.identity.common.java.eststelemetry; 2 | 3 | import com.microsoft.identity.common.java.commands.ICommandResult; 4 | 5 | import lombok.Builder; 6 | 7 | @Builder 8 | public class MockCommandResult implements ICommandResult { 9 | 10 | private String correlationId; 11 | private ResultStatus resultStatus; 12 | 13 | @Builder.Default 14 | private T result = null; 15 | 16 | @Override 17 | public String getCorrelationId() { 18 | return correlationId; 19 | } 20 | 21 | @Override 22 | public ResultStatus getStatus() { 23 | return resultStatus; 24 | } 25 | 26 | @Override 27 | public Object getResult() { 28 | return result; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /common4j/src/testFixtures/java/com/microsoft/identity/common4j/env/EnvironmentVariable.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.common4j.env; 24 | 25 | /** 26 | * Describes names for different environment variables available during test execution. 27 | */ 28 | public enum EnvironmentVariable { 29 | BUILD_REASON; 30 | } 31 | -------------------------------------------------------------------------------- /common4j/src/testFixtures/java/com/microsoft/identity/http/ResponseBody.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.http; 24 | 25 | public class ResponseBody { 26 | 27 | public static String SUCCESS = "{\"response\":\"success response\"}"; 28 | 29 | public static String GENERIC_ERROR = "{\"response\":\"error response\"}"; 30 | } 31 | -------------------------------------------------------------------------------- /common4j/versioning/version.properties: -------------------------------------------------------------------------------- 1 | #Wed May 12 20:08:39 UTC 2021 2 | versionName=21.1.0 3 | versionCode=1 4 | latestPatchVersion=227 5 | -------------------------------------------------------------------------------- /config/checkstyle/suppressions.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /config/credscan/suppression.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool": "Credential Scanner", 3 | "suppressions": [ 4 | { 5 | "file": "common/src/main/res/values-da/strings.xml", 6 | "_justification": "Password string for dialog box" 7 | }, 8 | { 9 | "file": "common/src/main/res/values-de/strings.xml", 10 | "_justification": "Password string for dialog box" 11 | }, 12 | { 13 | "file": "common/src/main/res/values-et/strings.xml", 14 | "_justification": "Password string for dialog box" 15 | }, 16 | { 17 | "file": "common/src/main/res/values-eu/strings.xml", 18 | "_justification": "Password string for dialog box" 19 | }, 20 | { 21 | "file": "common/src/main/res/values-nb/strings.xml", 22 | "_justification": "Password string for dialog box" 23 | }, 24 | { 25 | "file": "common/src/main/res/values-nl/strings.xml", 26 | "_justification": "Password string for dialog box" 27 | }, 28 | { 29 | "file": "common4j/src/test/com/microsoft/identity/common/java/platform/JweResponseTests.java", 30 | "_justification": "Mock data for test case" 31 | }, 32 | { 33 | "file": "common4j/src/test/com/microsoft/identity/common/java/crypto/SP800108KeyGenTests.java", 34 | "_justification": "Mock data for test case" 35 | }, 36 | { 37 | "file": "common4j/src/test/com/microsoft/identity/common/java/crypto/SP800108KeyGenTests.java", 38 | "_justification": "Mock data for test case" 39 | } 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | ariaTenantTokenProd="b6618d4b5d24466a9d2d0d8cde8cd6e4-ddcec952-23e9-4765-b4fb-f823ec69c6e3-7966" 2 | ariaTenantTokenTest="1e8435186fa849b28b1a402fb5074ff1-0b91a9ec-efad-440c-b92c-ac4cb55ba0ff-7490" 3 | 4 | android.useAndroidX=true 5 | 6 | # https://office.visualstudio.com/Outlook%20Mobile/_wiki/wikis/Outlook-Mobile.wiki/3780/Android-Studio-Gradle-Performance-tips-and-tricks 7 | org.gradle.parallel=true 8 | org.gradle.daemon=true 9 | 10 | # See https://stackoverflow.com/questions/56075455/expiring-daemon-because-jvm-heap-space-is-exhausted 11 | # we must make sure that the total size is <7G, as that's the RAM size of VM on the build pipeline. 12 | org.gradle.jvmargs=-Xmx3072m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError 13 | 14 | # This the TSL versionName... 15 | versionName=1.5.9 16 | 17 | # For OneAuth default abiSelection 18 | abiSelection=x86_64 19 | 20 | # Until we want to give it teeth 21 | org.gradle.dependency.verification=off 22 | -------------------------------------------------------------------------------- /gradle/verification-metadata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | false 6 | 7 | 8 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AzureAD/microsoft-authentication-library-common-for-android/b90b5caeac3491a66f318c4f5015bbbdeb942267/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Sep 14 13:15:58 PDT 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip 7 | -------------------------------------------------------------------------------- /keyvault/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /keyvault/src/main/java/com/microsoft/identity/internal/test/keyvault/Pair.java: -------------------------------------------------------------------------------- 1 | /* 2 | * KeyVaultClient 3 | * The key vault client performs cryptographic key operations and vault operations against the Key Vault service. 4 | * 5 | * OpenAPI spec version: 2016-10-01 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.microsoft.identity.internal.test.keyvault; 15 | 16 | public class Pair { 17 | private String name = ""; 18 | private String value = ""; 19 | 20 | public Pair (String name, String value) { 21 | setName(name); 22 | setValue(value); 23 | } 24 | 25 | private void setName(String name) { 26 | if (!isValidString(name)) return; 27 | 28 | this.name = name; 29 | } 30 | 31 | private void setValue(String value) { 32 | if (!isValidString(value)) return; 33 | 34 | this.value = value; 35 | } 36 | 37 | public String getName() { 38 | return this.name; 39 | } 40 | 41 | public String getValue() { 42 | return this.value; 43 | } 44 | 45 | private boolean isValidString(String arg) { 46 | if (arg == null) return false; 47 | if (arg.trim().isEmpty()) return false; 48 | 49 | return true; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /keyvault/src/main/java/com/microsoft/identity/internal/test/keyvault/auth/Authentication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * KeyVaultClient 3 | * The key vault client performs cryptographic key operations and vault operations against the Key Vault service. 4 | * 5 | * OpenAPI spec version: 2016-10-01 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.microsoft.identity.internal.test.keyvault.auth; 15 | 16 | import com.microsoft.identity.internal.test.keyvault.Pair; 17 | 18 | import java.util.Map; 19 | import java.util.List; 20 | 21 | public interface Authentication { 22 | /** 23 | * Apply authentication settings to header and query params. 24 | * 25 | * @param queryParams List of query parameters 26 | * @param headerParams Map of header parameters 27 | */ 28 | void applyToParams(List queryParams, Map headerParams); 29 | } 30 | -------------------------------------------------------------------------------- /keyvault/src/main/java/com/microsoft/identity/internal/test/keyvault/auth/HttpBasicAuth.java: -------------------------------------------------------------------------------- 1 | /* 2 | * KeyVaultClient 3 | * The key vault client performs cryptographic key operations and vault operations against the Key Vault service. 4 | * 5 | * OpenAPI spec version: 2016-10-01 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.microsoft.identity.internal.test.keyvault.auth; 15 | 16 | import com.microsoft.identity.internal.test.keyvault.Pair; 17 | 18 | import com.squareup.okhttp.Credentials; 19 | 20 | import java.util.Map; 21 | import java.util.List; 22 | 23 | public class HttpBasicAuth implements Authentication { 24 | private String username; 25 | private String password; 26 | 27 | public String getUsername() { 28 | return username; 29 | } 30 | 31 | public void setUsername(String username) { 32 | this.username = username; 33 | } 34 | 35 | public String getPassword() { 36 | return password; 37 | } 38 | 39 | public void setPassword(String password) { 40 | this.password = password; 41 | } 42 | 43 | @Override 44 | public void applyToParams(List queryParams, Map headerParams) { 45 | if (username == null && password == null) { 46 | return; 47 | } 48 | headerParams.put("Authorization", Credentials.basic( 49 | username == null ? "" : username, 50 | password == null ? "" : password)); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /keyvault/src/main/java/com/microsoft/identity/internal/test/keyvault/auth/OAuth.java: -------------------------------------------------------------------------------- 1 | /* 2 | * KeyVaultClient 3 | * The key vault client performs cryptographic key operations and vault operations against the Key Vault service. 4 | * 5 | * OpenAPI spec version: 2016-10-01 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.microsoft.identity.internal.test.keyvault.auth; 15 | 16 | import com.microsoft.identity.internal.test.keyvault.Pair; 17 | 18 | import java.util.Map; 19 | import java.util.List; 20 | 21 | 22 | public class OAuth implements Authentication { 23 | private String accessToken; 24 | 25 | public String getAccessToken() { 26 | return accessToken; 27 | } 28 | 29 | public void setAccessToken(String accessToken) { 30 | this.accessToken = accessToken; 31 | } 32 | 33 | @Override 34 | public void applyToParams(List queryParams, Map headerParams) { 35 | if (accessToken != null) { 36 | headerParams.put("Authorization", "Bearer " + accessToken); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /keyvault/src/main/java/com/microsoft/identity/internal/test/keyvault/auth/OAuthFlow.java: -------------------------------------------------------------------------------- 1 | /* 2 | * KeyVaultClient 3 | * The key vault client performs cryptographic key operations and vault operations against the Key Vault service. 4 | * 5 | * OpenAPI spec version: 2016-10-01 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.microsoft.identity.internal.test.keyvault.auth; 15 | 16 | public enum OAuthFlow { 17 | accessCode, implicit, password, application 18 | } 19 | -------------------------------------------------------------------------------- /labapi/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /labapi/src/main/java/com/microsoft/identity/internal/test/labapi/Configuration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Azure Identity Labs API 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: 1.0.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | package com.microsoft.identity.internal.test.labapi; 14 | 15 | @javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2021-06-01T10:19:44.716-07:00[America/Los_Angeles]")public class Configuration { 16 | private static ApiClient defaultApiClient = new ApiClient(); 17 | 18 | /** 19 | * Get the default API client, which would be used when creating API 20 | * instances without providing an API client. 21 | * 22 | * @return Default API client 23 | */ 24 | public static ApiClient getDefaultApiClient() { 25 | return defaultApiClient; 26 | } 27 | 28 | /** 29 | * Set the default API client, which would be used when creating API 30 | * instances without providing an API client. 31 | * 32 | * @param apiClient API client 33 | */ 34 | public static void setDefaultApiClient(ApiClient apiClient) { 35 | defaultApiClient = apiClient; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /labapi/src/main/java/com/microsoft/identity/internal/test/labapi/Pair.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Azure Identity Labs API 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: 1.0.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | package com.microsoft.identity.internal.test.labapi; 14 | 15 | @javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2021-06-01T10:19:44.716-07:00[America/Los_Angeles]")public class Pair { 16 | private String name = ""; 17 | private String value = ""; 18 | 19 | public Pair (String name, String value) { 20 | setName(name); 21 | setValue(value); 22 | } 23 | 24 | private void setName(String name) { 25 | if (!isValidString(name)) return; 26 | 27 | this.name = name; 28 | } 29 | 30 | private void setValue(String value) { 31 | if (!isValidString(value)) return; 32 | 33 | this.value = value; 34 | } 35 | 36 | public String getName() { 37 | return this.name; 38 | } 39 | 40 | public String getValue() { 41 | return this.value; 42 | } 43 | 44 | private boolean isValidString(String arg) { 45 | if (arg == null) return false; 46 | if (arg.trim().isEmpty()) return false; 47 | 48 | return true; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /labapi/src/main/java/com/microsoft/identity/internal/test/labapi/auth/Authentication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Azure Identity Labs API 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: 1.0.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | package com.microsoft.identity.internal.test.labapi.auth; 14 | 15 | import com.microsoft.identity.internal.test.labapi.Pair; 16 | 17 | import java.util.Map; 18 | import java.util.List; 19 | 20 | public interface Authentication { 21 | /** 22 | * Apply authentication settings to header and query params. 23 | * 24 | * @param queryParams List of query parameters 25 | * @param headerParams Map of header parameters 26 | */ 27 | void applyToParams(List queryParams, Map headerParams); 28 | } 29 | -------------------------------------------------------------------------------- /labapi/src/main/java/com/microsoft/identity/internal/test/labapi/auth/HttpBasicAuth.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Azure Identity Labs API 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: 1.0.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | package com.microsoft.identity.internal.test.labapi.auth; 14 | 15 | import com.microsoft.identity.internal.test.labapi.Pair; 16 | 17 | import com.squareup.okhttp.Credentials; 18 | 19 | import java.util.Map; 20 | import java.util.List; 21 | 22 | import java.io.UnsupportedEncodingException; 23 | 24 | public class HttpBasicAuth implements Authentication { 25 | private String username; 26 | private String password; 27 | 28 | public String getUsername() { 29 | return username; 30 | } 31 | 32 | public void setUsername(String username) { 33 | this.username = username; 34 | } 35 | 36 | public String getPassword() { 37 | return password; 38 | } 39 | 40 | public void setPassword(String password) { 41 | this.password = password; 42 | } 43 | 44 | @Override 45 | public void applyToParams(List queryParams, Map headerParams) { 46 | if (username == null && password == null) { 47 | return; 48 | } 49 | headerParams.put("Authorization", Credentials.basic( 50 | username == null ? "" : username, 51 | password == null ? "" : password)); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /labapi/src/main/java/com/microsoft/identity/internal/test/labapi/auth/OAuth.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Azure Identity Labs API 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: 1.0.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | package com.microsoft.identity.internal.test.labapi.auth; 14 | 15 | import com.microsoft.identity.internal.test.labapi.Pair; 16 | 17 | import java.util.Map; 18 | import java.util.List; 19 | 20 | @javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2021-06-01T10:19:44.716-07:00[America/Los_Angeles]")public class OAuth implements Authentication { 21 | private String accessToken; 22 | 23 | public String getAccessToken() { 24 | return accessToken; 25 | } 26 | 27 | public void setAccessToken(String accessToken) { 28 | this.accessToken = accessToken; 29 | } 30 | 31 | @Override 32 | public void applyToParams(List queryParams, Map headerParams) { 33 | if (accessToken != null) { 34 | headerParams.put("Authorization", "Bearer " + accessToken); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /labapi/src/main/java/com/microsoft/identity/internal/test/labapi/auth/OAuthFlow.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Azure Identity Labs API 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: 1.0.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | package com.microsoft.identity.internal.test.labapi.auth; 14 | 15 | public enum OAuthFlow { 16 | accessCode, implicit, password, application 17 | } 18 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | gradlePluginPortal() 6 | } 7 | } 8 | 9 | rootProject.name = "com.microsoft.identity" 10 | 11 | // Android Projects 12 | include(':common') 13 | project(':common').projectDir = new File('common') 14 | 15 | include(':testutils') 16 | project(':testutils').projectDir = new File('testutils') 17 | 18 | include(':uiautomationutilities') 19 | project(':uiautomationutilities').projectDir = new File('uiautomationutilities') 20 | 21 | // Pure Java Projects 22 | include(':common4j') 23 | project(':common4j').projectDir = new File('common4j') 24 | 25 | include(':keyvault') 26 | project(':keyvault').projectDir = new File('keyvault') 27 | 28 | include(':labapi') 29 | project(':labapi').projectDir = new File('labapi') 30 | 31 | include(':LabApiUtilities') 32 | project(':LabApiUtilities').projectDir = new File('LabApiUtilities') 33 | -------------------------------------------------------------------------------- /testutils/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /testutils/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /testutils/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /testutils/src/main/java/com/microsoft/identity/internal/testutils/kusto/IKustoTableData.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.internal.testutils.kusto; 24 | 25 | /** 26 | * A model for a data point in a Kusto Table. 27 | */ 28 | public interface IKustoTableData { 29 | 30 | String[] getTableDataAsCsv(); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /testutils/src/main/java/com/microsoft/identity/internal/testutils/labutils/Credential.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | package com.microsoft.identity.internal.testutils.labutils; 25 | 26 | /** 27 | * Created by shoatman on 3/12/2018. 28 | */ 29 | 30 | public class Credential { 31 | 32 | public String userName; 33 | public String password; 34 | } 35 | -------------------------------------------------------------------------------- /testutils/src/main/java/com/microsoft/identity/internal/testutils/labutils/LabGuest.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.identity.internal.testutils.labutils; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * A Class to facilitate writing tests for Guest Accounts 7 | */ 8 | public class LabGuest { 9 | private final String homeUpn; 10 | private final String homeTenantId; 11 | private final String homeDomain; 12 | private final List guestLabTenants; 13 | 14 | public LabGuest(String homeUpn, String homeDomain, String homeTenantId, List guestLabTenants) { 15 | this.homeUpn = homeUpn; 16 | this.homeDomain = homeDomain; 17 | this.homeTenantId = homeTenantId; 18 | this.guestLabTenants = guestLabTenants; 19 | } 20 | 21 | public String getHomeUpn() { 22 | return homeUpn; 23 | } 24 | 25 | public String getHomeDomain() { 26 | return homeDomain; 27 | } 28 | 29 | public String getHomeTenantId() { 30 | return homeTenantId; 31 | } 32 | 33 | public List getGuestLabTenants() { 34 | return guestLabTenants; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /testutils/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /uiautomationutilities/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /perf_tool/.vs/ 3 | /perf_tool/obj/ 4 | -------------------------------------------------------------------------------- /uiautomationutilities/perf_tool/PerfIdentity.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /uiautomationutilities/perf_tool/PerfIdentity.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30704.19 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PerfIdentity", "PerfIdentity.csproj", "{7C7CAB74-CD8B-4399-BDC9-22633089761D}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {7C7CAB74-CD8B-4399-BDC9-22633089761D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {7C7CAB74-CD8B-4399-BDC9-22633089761D}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {7C7CAB74-CD8B-4399-BDC9-22633089761D}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {7C7CAB74-CD8B-4399-BDC9-22633089761D}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {B0888206-D39E-416C-8837-F56B7AA284CD} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /uiautomationutilities/perf_tool/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "IdentityPerfTestApp": { 4 | "commandName": "Project", 5 | "commandLineArgs": "C:\\testdata\\basefiles\\ C:\\testdata\\basefiles2\\ C:\\testdata\\targetfiles\\ 123456 654321 987654 Pixel2 API28 MSALTestApp sender_email.example.com samplepassword email1@example.com,email2@example.com" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /uiautomationutilities/perf_tool/changelog.txt: -------------------------------------------------------------------------------- 1 | 11-Jan-2021 2 | -------------- 3 | - First release 4 | - The C# program Generates an html report based on the perf text codemarker files from two different builds. 5 | - Document: https://microsoft.sharepoint.com/teams/ADAL/_layouts/15/Doc.aspx?sourcedoc={0339bdd6-b5e5-4d94-b4c9-ea47127f5023}&action=edit&wd=target%28Platforms%2FAndroid.one%7C28086b2a-f539-bc47-b229-1610fc61c903%2FPerf%20tool%20for%20MSAL%20native%7C70105fa5-fe02-4349-969e-ded5131a9715%2F%29&wdorigin=703 6 | 7 | -------------------------------------------------------------------------------- /uiautomationutilities/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /uiautomationutilities/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /uiautomationutilities/src/main/java/com/microsoft/identity/client/ui/automation/IBrokerTest.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.client.ui.automation; 24 | 25 | import androidx.annotation.NonNull; 26 | 27 | import com.microsoft.identity.client.ui.automation.broker.ITestBroker; 28 | 29 | /** 30 | * An interface describing a test that can leverage a {@link ITestBroker} installed on the device. 31 | */ 32 | public interface IBrokerTest { 33 | 34 | @NonNull 35 | ITestBroker getBroker(); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /uiautomationutilities/src/main/java/com/microsoft/identity/client/ui/automation/constants/AuthScheme.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.client.ui.automation.constants; 24 | 25 | public enum AuthScheme { 26 | BEARER, 27 | POP 28 | } 29 | -------------------------------------------------------------------------------- /uiautomationutilities/src/main/java/com/microsoft/identity/client/ui/automation/constants/DeviceAdmin.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.identity.client.ui.automation.constants; 2 | 3 | /** 4 | * Admins that can be present and interacted with on a device during a UI Automated Test. 5 | */ 6 | public enum DeviceAdmin { 7 | 8 | COMPANY_PORTAL("Company Portal"), 9 | MICROSOFT_AUTHENTICATOR("Authenticator"), 10 | BROKER_HOST("userapp"); 11 | 12 | private String adminName; 13 | 14 | DeviceAdmin(String adminName) { 15 | this.adminName = adminName; 16 | } 17 | 18 | public String getAdminName() { 19 | return this.adminName; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /uiautomationutilities/src/main/java/com/microsoft/identity/client/ui/automation/constants/GlobalConstants.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.client.ui.automation.constants; 24 | 25 | /** 26 | * Class used to hold some constant variables for UI testing automation. 27 | */ 28 | public class GlobalConstants { 29 | public static final boolean IS_STAY_SIGN_IN_PAGE_EXPECTED = true; 30 | 31 | public static final String PIN = "1234"; 32 | } 33 | -------------------------------------------------------------------------------- /uiautomationutilities/src/main/java/com/microsoft/identity/client/ui/automation/interaction/IPromptHandler.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.client.ui.automation.interaction; 24 | 25 | public interface IPromptHandler { 26 | 27 | /** 28 | * Responds to the prompt for credentials during an authorization request. 29 | * 30 | * @param username 31 | * @param password 32 | */ 33 | void handlePrompt(String username, String password); 34 | } 35 | -------------------------------------------------------------------------------- /uiautomationutilities/src/main/java/com/microsoft/identity/client/ui/automation/interaction/PromptParameter.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.client.ui.automation.interaction; 24 | 25 | /** 26 | * The prompt behaviour expected during a given authorization request. 27 | */ 28 | public enum PromptParameter { 29 | SELECT_ACCOUNT, 30 | LOGIN, 31 | CONSENT, 32 | WHEN_REQUIRED, 33 | CREATE 34 | } 35 | -------------------------------------------------------------------------------- /uiautomationutilities/src/main/java/com/microsoft/identity/client/ui/automation/interaction/UiResponse.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.client.ui.automation.interaction; 24 | 25 | /** 26 | * The desired response to a given UI challenge such as consent page or speed bump. 27 | */ 28 | public enum UiResponse { 29 | ACCEPT, 30 | DECLINE 31 | } 32 | -------------------------------------------------------------------------------- /uiautomationutilities/src/main/java/com/microsoft/identity/client/ui/automation/performance/PerformanceProfile.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // All rights reserved. 3 | // 4 | // This code is licensed under the MIT License. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files(the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions : 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | package com.microsoft.identity.client.ui.automation.performance; 24 | 25 | /** 26 | * This is basically a unit that can be monitored for performance. 27 | *

28 | * Others include GPU, Battery/Power 29 | */ 30 | public enum PerformanceProfile { 31 | CPU, 32 | MEMORY, 33 | NETWORK 34 | } 35 | -------------------------------------------------------------------------------- /versioning/version.properties: -------------------------------------------------------------------------------- 1 | #Tue Apr 06 22:55:08 UTC 2021 2 | versionName=21.1.0 3 | versionCode=1 4 | latestPatchVersion=234 5 | --------------------------------------------------------------------------------