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

Filter by extension

Filter by extension

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

import com.google.gson.annotations.SerializedName
import com.microsoft.identity.common.java.request.SdkType

/**
* Additional required parameters for WebApps operations.
*/
data class WebAppsAdditionalRequiredParameters(
// A parameter from Edge which indicates whether the calling application can show UI.
@SerializedName(FIELD_CAN_SHOW_UI)
val canShowUi: Boolean = false,

@SerializedName(FIELD_CALLING_PACKAGE_NAME)
val callingPackageName: String,

@SerializedName(FIELD_CALLING_APPLICATION_NAME)
val callingApplicationName: String,

@SerializedName(FIELD_CALLING_APPLICATION_VERSION)
val callingApplicationVersion: String,

@SerializedName(FIELD_SDK_TYPE)
val sdkType: SdkType,

@SerializedName(FIELD_SDK_VERSION)
val sdkVersion: String
) {
companion object {
const val FIELD_CAN_SHOW_UI = "canShowUi"
const val FIELD_CALLING_PACKAGE_NAME = "callingPackageName"
const val FIELD_CALLING_APPLICATION_NAME = "callingApplicationName"
const val FIELD_CALLING_APPLICATION_VERSION = "callingApplicationVersion"
const val FIELD_SDK_TYPE = "sdkType"
const val FIELD_SDK_VERSION = "sdkVersion"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
import com.microsoft.identity.common.internal.broker.ipc.BoundServiceStrategy;
import com.microsoft.identity.common.internal.broker.ipc.BrokerOperationBundle;
import com.microsoft.identity.common.internal.broker.ipc.IIpcStrategy;
import com.microsoft.identity.common.internal.broker.ipc.WebAppsAdditionalRequiredParameters;
import com.microsoft.identity.common.internal.cache.ActiveBrokerCacheUpdater;
import com.microsoft.identity.common.internal.cache.ClientActiveBrokerCache;
import com.microsoft.identity.common.internal.cache.HelloCache;
Expand Down Expand Up @@ -1426,10 +1427,12 @@ public void putValueInSuccessEvent(@NonNull final ApiEndEvent event,
*
* @param request request string
* @param minBrokerProtocolVersion minimum broker protocol version the caller requires.
* @param additionalRequiredParams additional required parameters for web app request.
* @throws BaseException
*/
public String executeWebAppRequest(@NonNull final String request,
@NonNull final String minBrokerProtocolVersion) throws BaseException {
@NonNull final String minBrokerProtocolVersion,
@NonNull final WebAppsAdditionalRequiredParameters additionalRequiredParams) throws BaseException {
return getBrokerOperationExecutor().execute(null,
new BrokerOperation<String>() {
private String negotiatedBrokerProtocolVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,11 @@ private ErrorStrings() {
*/
public static final String ALL_WEBAPP_SIGN_OUTS_FAILED = "all_webapp_sign_outs_failed";

/**
* The requested feature flight is disabled.
*/
public static final String FLIGHT_DISABLED = "flight_disabled";

/**
* A generic error code used when no other error code is applicable.
*/
Expand Down
Loading