Skip to content

Commit

Permalink
Merge pull request #17730 from Thumimku/update-Attestation-app-model
Browse files Browse the repository at this point in the history
add attestation meta data model
  • Loading branch information
Thumimku authored Nov 10, 2023
2 parents c9e94e8 + 6436090 commit 2617df8
Show file tree
Hide file tree
Showing 3 changed files with 205 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public class AdvancedApplicationConfiguration {

private Boolean fragment;
private List<AdditionalSpProperties> additionalSpProperties;
private Boolean enableAPIBasedAuthentication;
private AdvancedApplicationConfigurationAttestationMetaData attestationMetaData;

private Boolean useExternalConsentPage;

Expand Down Expand Up @@ -189,7 +191,43 @@ public void setFragment(Boolean fragment) {
}

/**
*
* Decides whether API Based Authentication is enabled for this application.
**/
public AdvancedApplicationConfiguration enableAPIBasedAuthentication(Boolean enableAPIBasedAuthentication) {

this.enableAPIBasedAuthentication = enableAPIBasedAuthentication;
return this;
}

@ApiModelProperty(example = "false", value = "Decides whether API Based Authentication is enabled for this application.")
@JsonProperty("enableAPIBasedAuthentication")
@Valid
public Boolean getEnableAPIBasedAuthentication() {
return enableAPIBasedAuthentication;
}
public void setEnableAPIBasedAuthentication(Boolean enableAPIBasedAuthentication) {
this.enableAPIBasedAuthentication = enableAPIBasedAuthentication;
}

/**
**/
public AdvancedApplicationConfiguration attestationMetaData(AdvancedApplicationConfigurationAttestationMetaData attestationMetaData) {

this.attestationMetaData = attestationMetaData;
return this;
}

@ApiModelProperty(value = "")
@JsonProperty("attestationMetaData")
@Valid
public AdvancedApplicationConfigurationAttestationMetaData getAttestationMetaData() {
return attestationMetaData;
}
public void setAttestationMetaData(AdvancedApplicationConfigurationAttestationMetaData attestationMetaData) {
this.attestationMetaData = attestationMetaData;
}

/**
**/
public AdvancedApplicationConfiguration additionalSpProperties(List<AdditionalSpProperties> additionalSpProperties) {

Expand Down Expand Up @@ -245,12 +283,14 @@ public boolean equals(Object o) {
Objects.equals(this.enableAuthorization, advancedApplicationConfiguration.enableAuthorization) &&
Objects.equals(this.fragment, advancedApplicationConfiguration.fragment) &&
Objects.equals(this.additionalSpProperties, advancedApplicationConfiguration.additionalSpProperties) &&
Objects.equals(this.enableAPIBasedAuthentication, advancedApplicationConfiguration.enableAPIBasedAuthentication) &&
Objects.equals(this.attestationMetaData, advancedApplicationConfiguration.attestationMetaData) &&
Objects.equals(this.useExternalConsentPage, advancedApplicationConfiguration.useExternalConsentPage);
}

@Override
public int hashCode() {
return Objects.hash(saas, discoverableByEndUsers, certificate, skipLoginConsent, skipLogoutConsent, returnAuthenticatedIdpList, enableAuthorization, fragment, additionalSpProperties, useExternalConsentPage);
return Objects.hash(saas, discoverableByEndUsers, certificate, skipLoginConsent, skipLogoutConsent, returnAuthenticatedIdpList, enableAuthorization, fragment, enableAPIBasedAuthentication, attestationMetaData, additionalSpProperties, useExternalConsentPage);
}

@Override
Expand All @@ -267,6 +307,8 @@ public String toString() {
sb.append(" returnAuthenticatedIdpList: ").append(toIndentedString(returnAuthenticatedIdpList)).append("\n");
sb.append(" enableAuthorization: ").append(toIndentedString(enableAuthorization)).append("\n");
sb.append(" fragment: ").append(toIndentedString(fragment)).append("\n");
sb.append(" enableAPIBasedAuthentication: ").append(toIndentedString(enableAPIBasedAuthentication)).append("\n");
sb.append(" attestationMetaData: ").append(toIndentedString(attestationMetaData)).append("\n");
sb.append(" additionalSpProperties: ").append(toIndentedString(additionalSpProperties)).append("\n");
sb.append(" useExternalConsentPage: ").append(toIndentedString(useExternalConsentPage)).append("\n");
sb.append("}");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
/*
* Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

package org.wso2.identity.integration.test.rest.api.server.application.management.v1.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.Valid;
import java.util.Objects;

public class AdvancedApplicationConfigurationAttestationMetaData {

private Boolean enableClientAttestation;
private String androidPackageName;
private Object androidAttestationServiceCredentials;
private String appleAppId;

/**
* Decides whether client attestation enabled for this application.
**/
public AdvancedApplicationConfigurationAttestationMetaData enableClientAttestation(Boolean enableClientAttestation) {

this.enableClientAttestation = enableClientAttestation;
return this;
}

@ApiModelProperty(example = "false", value = "Decides whether client attestation enabled for this application.")
@JsonProperty("enableClientAttestation")
@Valid
public Boolean getEnableClientAttestation() {
return enableClientAttestation;
}
public void setEnableClientAttestation(Boolean enableClientAttestation) {
this.enableClientAttestation = enableClientAttestation;
}

/**
* Decides the android package name of the application.
**/
public AdvancedApplicationConfigurationAttestationMetaData androidPackageName(String androidPackageName) {

this.androidPackageName = androidPackageName;
return this;
}

@ApiModelProperty(example = "com.wso2.mobile.sample", value = "Decides the android package name of the application.")
@JsonProperty("androidPackageName")
@Valid
public String getAndroidPackageName() {
return androidPackageName;
}
public void setAndroidPackageName(String androidPackageName) {
this.androidPackageName = androidPackageName;
}

/**
* Decides the credentials for the service account to access Google Play Integrity Service.
**/
public AdvancedApplicationConfigurationAttestationMetaData androidAttestationServiceCredentials(Object androidAttestationServiceCredentials) {

this.androidAttestationServiceCredentials = androidAttestationServiceCredentials;
return this;
}

@ApiModelProperty(value = "Decides the credentials for the service account to access Google Play Integrity Service.")
@JsonProperty("androidAttestationServiceCredentials")
@Valid
public Object getAndroidAttestationServiceCredentials() {
return androidAttestationServiceCredentials;
}
public void setAndroidAttestationServiceCredentials(Object androidAttestationServiceCredentials) {
this.androidAttestationServiceCredentials = androidAttestationServiceCredentials;
}

/**
* Decides the apple app id which denotes {apple-teamId}.{bundleId}.
**/
public AdvancedApplicationConfigurationAttestationMetaData appleAppId(String appleAppId) {

this.appleAppId = appleAppId;
return this;
}

@ApiModelProperty(example = "APPLETEAMID.com.wso2.mobile.sample", value = "Decides the apple app id which denotes {apple-teamId}.{bundleId}.")
@JsonProperty("appleAppId")
@Valid
public String getAppleAppId() {
return appleAppId;
}
public void setAppleAppId(String appleAppId) {
this.appleAppId = appleAppId;
}



@Override
public boolean equals(Object o) {

if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdvancedApplicationConfigurationAttestationMetaData advancedApplicationConfigurationAttestationMetaData = (AdvancedApplicationConfigurationAttestationMetaData) o;
return Objects.equals(this.enableClientAttestation, advancedApplicationConfigurationAttestationMetaData.enableClientAttestation) &&
Objects.equals(this.androidPackageName, advancedApplicationConfigurationAttestationMetaData.androidPackageName) &&
Objects.equals(this.androidAttestationServiceCredentials, advancedApplicationConfigurationAttestationMetaData.androidAttestationServiceCredentials) &&
Objects.equals(this.appleAppId, advancedApplicationConfigurationAttestationMetaData.appleAppId);
}

@Override
public int hashCode() {
return Objects.hash(enableClientAttestation, androidPackageName, androidAttestationServiceCredentials, appleAppId);
}

@Override
public String toString() {

StringBuilder sb = new StringBuilder();
sb.append("class AdvancedApplicationConfigurationAttestationMetaData {\n");

sb.append(" enableClientAttestation: ").append(toIndentedString(enableClientAttestation)).append("\n");
sb.append(" androidPackageName: ").append(toIndentedString(androidPackageName)).append("\n");
sb.append(" androidAttestationServiceCredentials: ").append(toIndentedString(androidAttestationServiceCredentials)).append("\n");
sb.append(" appleAppId: ").append(toIndentedString(appleAppId)).append("\n");
sb.append("}");
return sb.toString();
}

/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {

if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n");
}
}

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2435,7 +2435,7 @@
<!-- Identity REST API feature -->
<identity.api.dispatcher.version>2.0.13</identity.api.dispatcher.version>
<identity.user.api.version>1.3.24</identity.user.api.version>
<identity.server.api.version>1.2.116</identity.server.api.version>
<identity.server.api.version>1.2.117</identity.server.api.version>

<identity.agent.sso.version>5.5.9</identity.agent.sso.version>
<identity.tool.samlsso.validator.version>5.5.7</identity.tool.samlsso.validator.version>
Expand Down

0 comments on commit 2617df8

Please sign in to comment.