-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: TNG dependencies removed
- Loading branch information
Showing
25 changed files
with
353 additions
and
143 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
63 changes: 63 additions & 0 deletions
63
src/main/java/tng/trustnetwork/keydistribution/model/TrustListItem.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,63 @@ | ||
package tng.trustnetwork.keydistribution.model; | ||
|
||
import java.time.ZonedDateTime; | ||
|
||
public class TrustListItem { | ||
private String kid; | ||
private ZonedDateTime timestamp; | ||
private String rawData; | ||
private String country; | ||
private String thumbprint; | ||
private String signature; | ||
|
||
public TrustListItem() { | ||
} | ||
|
||
public String getKid() { | ||
return this.kid; | ||
} | ||
|
||
public ZonedDateTime getTimestamp() { | ||
return this.timestamp; | ||
} | ||
|
||
public String getRawData() { | ||
return this.rawData; | ||
} | ||
|
||
public String getCountry() { | ||
return this.country; | ||
} | ||
|
||
public String getThumbprint() { | ||
return this.thumbprint; | ||
} | ||
|
||
public String getSignature() { | ||
return this.signature; | ||
} | ||
|
||
public void setKid(final String kid) { | ||
this.kid = kid; | ||
} | ||
|
||
public void setTimestamp(final ZonedDateTime timestamp) { | ||
this.timestamp = timestamp; | ||
} | ||
|
||
public void setRawData(final String rawData) { | ||
this.rawData = rawData; | ||
} | ||
|
||
public void setCountry(final String country) { | ||
this.country = country; | ||
} | ||
|
||
public void setThumbprint(final String thumbprint) { | ||
this.thumbprint = thumbprint; | ||
} | ||
|
||
public void setSignature(final String signature) { | ||
this.signature = signature; | ||
} | ||
} |
116 changes: 116 additions & 0 deletions
116
src/main/java/tng/trustnetwork/keydistribution/model/TrustedIssuer.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,116 @@ | ||
package tng.trustnetwork.keydistribution.model; | ||
|
||
import java.time.ZonedDateTime; | ||
|
||
public class TrustedIssuer { | ||
private String url; | ||
private UrlType type; | ||
private String country; | ||
private String thumbprint; | ||
private String sslPublicKey; | ||
private String keyStorageType; | ||
private String signature; | ||
private ZonedDateTime timestamp; | ||
private String name; | ||
private String uuid; | ||
private String domain; | ||
|
||
public TrustedIssuer() { | ||
} | ||
|
||
public String getUrl() { | ||
return this.url; | ||
} | ||
|
||
public UrlType getType() { | ||
return this.type; | ||
} | ||
|
||
public String getCountry() { | ||
return this.country; | ||
} | ||
|
||
public String getThumbprint() { | ||
return this.thumbprint; | ||
} | ||
|
||
public String getSslPublicKey() { | ||
return this.sslPublicKey; | ||
} | ||
|
||
public String getKeyStorageType() { | ||
return this.keyStorageType; | ||
} | ||
|
||
public String getSignature() { | ||
return this.signature; | ||
} | ||
|
||
public ZonedDateTime getTimestamp() { | ||
return this.timestamp; | ||
} | ||
|
||
public String getName() { | ||
return this.name; | ||
} | ||
|
||
public String getUuid() { | ||
return this.uuid; | ||
} | ||
|
||
public String getDomain() { | ||
return this.domain; | ||
} | ||
|
||
public void setUrl(final String url) { | ||
this.url = url; | ||
} | ||
|
||
public void setType(final UrlType type) { | ||
this.type = type; | ||
} | ||
|
||
public void setCountry(final String country) { | ||
this.country = country; | ||
} | ||
|
||
public void setThumbprint(final String thumbprint) { | ||
this.thumbprint = thumbprint; | ||
} | ||
|
||
public void setSslPublicKey(final String sslPublicKey) { | ||
this.sslPublicKey = sslPublicKey; | ||
} | ||
|
||
public void setKeyStorageType(final String keyStorageType) { | ||
this.keyStorageType = keyStorageType; | ||
} | ||
|
||
public void setSignature(final String signature) { | ||
this.signature = signature; | ||
} | ||
|
||
public void setTimestamp(final ZonedDateTime timestamp) { | ||
this.timestamp = timestamp; | ||
} | ||
|
||
public void setName(final String name) { | ||
this.name = name; | ||
} | ||
|
||
public void setUuid(final String uuid) { | ||
this.uuid = uuid; | ||
} | ||
|
||
public void setDomain(final String domain) { | ||
this.domain = domain; | ||
} | ||
|
||
public static enum UrlType { | ||
HTTP, | ||
DID; | ||
|
||
private UrlType() { | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -34,6 +34,7 @@ | |
+ "\"details\":\"...\"\n" | ||
+ "}" | ||
) | ||
|
||
@Data | ||
@AllArgsConstructor | ||
public class ProblemReportDto { | ||
|
36 changes: 36 additions & 0 deletions
36
src/main/java/tng/trustnetwork/keydistribution/service/DummyDownloadConnector.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,36 @@ | ||
package tng.trustnetwork.keydistribution.service; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collections; | ||
import java.util.List; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | ||
import org.springframework.scheduling.annotation.EnableScheduling; | ||
import org.springframework.stereotype.Service; | ||
import tng.trustnetwork.keydistribution.model.TrustListItem; | ||
import tng.trustnetwork.keydistribution.model.TrustedIssuer; | ||
|
||
@ConditionalOnProperty({"dgc.gateway.connector.enabled"}) | ||
@Service | ||
@EnableScheduling | ||
@RequiredArgsConstructor | ||
public class DummyDownloadConnector { | ||
|
||
private List<TrustListItem> trustedCertificates = new ArrayList(); | ||
|
||
private List<TrustedIssuer> trustedIssuers = new ArrayList(); | ||
|
||
public List<TrustListItem> getTrustedCertificates() { | ||
this.updateIfRequired(); | ||
return Collections.unmodifiableList(this.trustedCertificates); | ||
} | ||
|
||
public List<TrustedIssuer> getTrustedIssuers() { | ||
this.updateIfRequired(); | ||
return Collections.unmodifiableList(this.trustedIssuers); | ||
} | ||
|
||
private void updateIfRequired() { | ||
|
||
} | ||
} |
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
Oops, something went wrong.