-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
528404a
commit cbb0101
Showing
9 changed files
with
147 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...rapper-api/src/main/java/de/sovity/edc/ext/wrapper/api/ui/model/DashboardCxDidConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package de.sovity.edc.ext.wrapper.api.ui.model; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
|
||
@Data | ||
@NoArgsConstructor | ||
@Schema(description = "Managed Identity Wallet (MIW) Config") | ||
public class DashboardCxDidConfig { | ||
@Schema(description = "My DID / edc.iam.issuer.id", requiredMode = Schema.RequiredMode.REQUIRED) | ||
private String myDid; | ||
|
||
@Schema(description = "Wallet Token Url / edc.iam.sts.oauth.token.url", requiredMode = Schema.RequiredMode.REQUIRED) | ||
private String walletTokenUrl; | ||
|
||
@Schema(description = "Trusted VC Issuer / edc.iam.trusted-issuer.cofinity.id", requiredMode = Schema.RequiredMode.REQUIRED) | ||
private String trustedVcIssuer; | ||
|
||
@Schema(description = "BDRS Url / tx.iam.iatp.bdrs.server.url", requiredMode = Schema.RequiredMode.REQUIRED) | ||
private String bdrsUrl; | ||
|
||
@Schema(description = "STS DIM Url / edc.iam.sts.dim.url", requiredMode = Schema.RequiredMode.REQUIRED) | ||
private String dimUrl; | ||
} |
20 changes: 0 additions & 20 deletions
20
.../wrapper-api/src/main/java/de/sovity/edc/ext/wrapper/api/ui/model/DashboardMiwConfig.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
...in/java/de/sovity/edc/ext/wrapper/api/ui/pages/dashboard/services/CxDidConfigService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
* Copyright (c) 2022 sovity GmbH | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Contributors: | ||
* sovity GmbH - initial API and implementation | ||
* | ||
*/ | ||
|
||
package de.sovity.edc.ext.wrapper.api.ui.pages.dashboard.services; | ||
|
||
import de.sovity.edc.ext.wrapper.api.ui.model.DashboardCxDidConfig; | ||
import lombok.RequiredArgsConstructor; | ||
import org.eclipse.edc.spi.system.configuration.Config; | ||
|
||
import static com.apicatalog.jsonld.StringUtils.isBlank; | ||
|
||
@RequiredArgsConstructor | ||
public class CxDidConfigService { | ||
private final Config config; | ||
|
||
/** | ||
* Wallet Token Url | ||
*/ | ||
private static final String EDC_IAM_STS_OAUTH_TOKEN_URL = "edc.iam.sts.oauth.token.url"; | ||
|
||
|
||
/** | ||
* Trusted VC Issuer | ||
*/ | ||
private static final String EDC_IAM_TRUSTED_ISSUER_COFINITY_ID = "edc.iam.trusted-issuer.cofinity.id"; | ||
|
||
|
||
/** | ||
* BDRS Url | ||
*/ | ||
|
||
private static final String TX_IAM_IATP_BDRS_SERVER_URL = "tx.iam.iatp.bdrs.server.url"; | ||
|
||
|
||
/** | ||
* My DID | ||
*/ | ||
private static final String EDC_IAM_ISSUER_ID = "edc.iam.issuer.id"; | ||
|
||
|
||
/** | ||
* DIM Url | ||
*/ | ||
private static final String EDC_IAM_STS_DIM_URL = "edc.iam.sts.dim.url"; | ||
|
||
public DashboardCxDidConfig buildCxDidConfigOrNull() { | ||
var cxDidConfig = new DashboardCxDidConfig(); | ||
cxDidConfig.setMyDid(configValue(EDC_IAM_ISSUER_ID)); | ||
cxDidConfig.setWalletTokenUrl(configValue(EDC_IAM_STS_OAUTH_TOKEN_URL)); | ||
cxDidConfig.setTrustedVcIssuer(configValue(EDC_IAM_TRUSTED_ISSUER_COFINITY_ID)); | ||
cxDidConfig.setDimUrl(configValue(EDC_IAM_STS_DIM_URL)); | ||
cxDidConfig.setBdrsUrl(configValue(TX_IAM_IATP_BDRS_SERVER_URL)); | ||
return isBlank(cxDidConfig.getMyDid()) ? null : cxDidConfig; | ||
} | ||
|
||
private String configValue(String configKey) { | ||
return config.getString(configKey, ""); | ||
} | ||
} |
54 changes: 0 additions & 54 deletions
54
...main/java/de/sovity/edc/ext/wrapper/api/ui/pages/dashboard/services/MiwConfigService.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters