-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: blockchain token validation reworked (#15)
- Loading branch information
1 parent
c345593
commit 38635e7
Showing
66 changed files
with
3,176 additions
and
433 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
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
465 changes: 162 additions & 303 deletions
465
...a/berlin/tu/ise/extension/blockchain/catalog/listener/BlockchainSmartContractService.java
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
plugins { | ||
`java-library` | ||
id("application") | ||
id("com.github.johnrengelman.shadow") version "7.1.2" | ||
id("io.swagger.core.v3.swagger-gradle-plugin") | ||
} | ||
|
||
val groupId: String by project | ||
val edcVersion: String by project | ||
|
||
dependencies { | ||
implementation(libs.edc.vault.filesystem) | ||
} | ||
|
||
|
||
application { | ||
mainClass.set("org.eclipse.edc.boot.system.runtime.BaseRuntime") | ||
} | ||
|
||
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> { | ||
exclude("**/pom.properties", "**/pom.xml") | ||
mergeServiceFiles() | ||
archiveFileName.set("consumer.jar") | ||
} |
30 changes: 30 additions & 0 deletions
30
extensions/helper/src/main/java/berlin/tu/ise/extension/helper/HelperExtension.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,30 @@ | ||
package berlin.tu.ise.extension.helper; | ||
|
||
|
||
import org.eclipse.edc.runtime.metamodel.annotation.Extension; | ||
import org.eclipse.edc.spi.system.ServiceExtension; | ||
import org.eclipse.edc.spi.system.ServiceExtensionContext; | ||
|
||
@Extension(value = "TU Berlin Helper Extensions") | ||
public class HelperExtension implements ServiceExtension { | ||
//@Inject | ||
//private FsVaultExtension fsVaultExtension; | ||
|
||
|
||
private ServiceExtensionContext context; | ||
|
||
|
||
@Override | ||
public void initialize(ServiceExtensionContext context) { | ||
|
||
this.context = context; | ||
|
||
var monitor = context.getMonitor(); | ||
|
||
monitor.info("HelperExtensions initialized"); | ||
|
||
|
||
} | ||
|
||
|
||
} |
1 change: 1 addition & 0 deletions
1
...s/helper/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension
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 @@ | ||
berlin.tu.ise.extension.helper.HelperExtension |
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,24 @@ | ||
/* | ||
* Copyright (c) 2022 Amadeus | ||
* | ||
* 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: | ||
* Amadeus - initial API and implementation | ||
* | ||
*/ | ||
|
||
plugins { | ||
`java-library` | ||
} | ||
|
||
dependencies { | ||
api(libs.edc.spi.http) | ||
api(libs.edc.spi.oauth2) | ||
} | ||
|
||
|
47 changes: 47 additions & 0 deletions
47
.../oauth2/oauth2-client/src/main/java/org/eclipse/edc/iam/oauth2/Oauth2ClientExtension.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,47 @@ | ||
/* | ||
* Copyright (c) 2022 Amadeus | ||
* | ||
* 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: | ||
* Amadeus - initial API and implementation | ||
* | ||
*/ | ||
|
||
package org.eclipse.edc.iam.oauth2; | ||
|
||
import org.eclipse.edc.iam.oauth2.client.Oauth2ClientImpl; | ||
import org.eclipse.edc.iam.oauth2.spi.client.Oauth2Client; | ||
import org.eclipse.edc.runtime.metamodel.annotation.Extension; | ||
import org.eclipse.edc.runtime.metamodel.annotation.Inject; | ||
import org.eclipse.edc.runtime.metamodel.annotation.Provider; | ||
import org.eclipse.edc.spi.http.EdcHttpClient; | ||
import org.eclipse.edc.spi.system.ServiceExtension; | ||
import org.eclipse.edc.spi.system.ServiceExtensionContext; | ||
import org.eclipse.edc.spi.types.TypeManager; | ||
|
||
@Extension(value = Oauth2ClientExtension.NAME) | ||
public class Oauth2ClientExtension implements ServiceExtension { | ||
|
||
public static final String NAME = "OAuth2 Client"; | ||
|
||
@Inject | ||
private EdcHttpClient httpClient; | ||
|
||
@Inject | ||
private TypeManager typeManager; | ||
|
||
@Override | ||
public String name() { | ||
return NAME; | ||
} | ||
|
||
@Provider | ||
public Oauth2Client oauth2Client(ServiceExtensionContext context) { | ||
return new Oauth2ClientImpl(httpClient, typeManager); | ||
} | ||
} |
Oops, something went wrong.