Skip to content

Commit

Permalink
Merge pull request #38 from filip26/patch/technical-debt
Browse files Browse the repository at this point in the history
Prepare 0.7.0 release
  • Loading branch information
filip26 authored Jul 2, 2022
2 parents dc85c6c + 2caf9ce commit 3a20b34
Show file tree
Hide file tree
Showing 72 changed files with 1,828 additions and 1,974 deletions.
48 changes: 46 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Iron Verifiable Credentials Processor & API
# Iron Verifiable Credentials Processor

An implementation of the [Verifiable Credentials](https://www.w3.org/TR/vc-data-model/) in Java.

Expand All @@ -16,7 +16,42 @@ An implementation of the [Verifiable Credentials](https://www.w3.org/TR/vc-data-
* Issuing VC/VP
* Signature
* Ed25519 Signature 2020
* [HTTP API & Service](https://github.com/filip26/vc-http-api)
* [VC HTTP API & Service](https://github.com/filip26/iron-vc-api)

## Installation

### Maven

```xml
<!-- Java 17 -->
<dependency>
<groupId>com.apicatalog</groupId>
<artifactId>iron-verifiable-credentials/artifactId>
<version>0.7.0</version>
</dependency>

```

or

```xml
<!-- Android (Java 8, Tink) -->
<dependency>
<groupId>com.apicatalog</groupId>
<artifactId>iron-verifiable-credentials-jre8</artifactId>
<version>0.7.0</version>
</dependency>
```

### Gradle

```gradle
compile group: 'com.apicatalog', name: 'iron-verifiable-credentials-jre8', version: '0.7.0'
```

## Documentation

[![javadoc](https://javadoc.io/badge2/com.apicatalog/iron-verifiable-credentials/javadoc.svg)](https://javadoc.io/doc/com.apicatalog/iron-verifiable-credentials)

## Usage

Expand Down Expand Up @@ -91,3 +126,12 @@ Fork and clone the project repository.
* [Ed25519 Signature 2020](https://w3c-ccg.github.io/lds-ed25519-2020/)
* [The did:key Method v0.7](https://w3c-ccg.github.io/did-method-key/)
* [Decentralized Identifiers (DIDs) v1.0](https://www.w3.org/TR/did-core/)

## Sponsors

<a href="https://github.com/digitalbazaar">
<img src="https://avatars.githubusercontent.com/u/167436?s=200&v=4" width="40" />
</a>

## Commercial Support
Commercial support is available at filip26@gmail.com
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

| Version | Supported |
| ------- | ------------------ |
| 0.x.x | :white_check_mark: |
| 1.x.x | :white_check_mark: |

## Reporting a Vulnerability

Expand Down
5 changes: 2 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<parent>
<groupId>com.apicatalog</groupId>
<artifactId>iron</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.7.0</version>
<relativePath>pom_parent.xml</relativePath>
</parent>

<artifactId>iron-verifiable-credentials</artifactId>
<packaging>jar</packaging>

<name>Iron Verifiable Credentials</name>
<name>Iron Verifiable Credentials (JRE17)</name>

<url>https://github.com/filip26/iron-verifiable-credentials</url>

Expand Down Expand Up @@ -73,4 +73,3 @@
</profile>
</profiles>
</project>

2 changes: 1 addition & 1 deletion pom_jre8.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.apicatalog</groupId>
<artifactId>iron</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.7.0</version>
<relativePath>pom_parent.xml</relativePath>
</parent>

Expand Down
47 changes: 46 additions & 1 deletion pom_parent.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.apicatalog</groupId>
<artifactId>iron</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.7.0</version>
<packaging>pom</packaging>

<name>Iron Verifiable Credentials</name>
Expand Down Expand Up @@ -195,10 +195,55 @@
</plugin>
</plugins>
</build>

<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>

<profiles>
<profile>
<id>maven-central</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
</profile>
</profiles>
</project>
8 changes: 3 additions & 5 deletions src/main/java/com/apicatalog/did/DidDocument.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,18 @@
import jakarta.json.JsonObject;

/**
* @see {@link https://www.w3.org/TR/did-core/#did-document-properties}
* DID Document
*
* @see <a href="https://www.w3.org/TR/did-core/#did-document-properties">DID document properties</a>
*/

public interface DidDocument {


Did getId();

Set<Did> getController();

Set<VerificationMethod> getVerificationMethod();

//TODO getters

JsonObject toJson();

}
25 changes: 1 addition & 24 deletions src/main/java/com/apicatalog/did/DidDocumentBuilder.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package com.apicatalog.did;

import java.net.URI;

import com.apicatalog.ld.signature.proof.VerificationMethod;

public class DidDocumentBuilder {
public final class DidDocumentBuilder {

private final DidDocumentImpl document;

Expand All @@ -26,28 +24,7 @@ public DidDocumentBuilder add(VerificationMethod verificationMethod) {
return this;
}

public DidDocumentBuilder addAuthentication(DidUrl didUrl) {
//TODO
return this;
}

public DidDocument build() {
return document;
}

public DidDocumentBuilder addAssertionMethod(URI id) {
// TODO Auto-generated method stub
return this;
}

public DidDocumentBuilder addCapabilityInvocation(URI id) {
// TODO Auto-generated method stub
return this;
}

public DidDocumentBuilder addCapabilityDelegation(URI id) {
// TODO Auto-generated method stub
return this;
}

}
9 changes: 1 addition & 8 deletions src/main/java/com/apicatalog/did/DidDocumentImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@

class DidDocumentImpl implements DidDocument {

/**
* @see {@link https://www.w3.org/TR/did-core/#did-document-properties}
*/
protected Did id;

protected Set<URI> alsoKnownAs;
Expand All @@ -29,16 +26,13 @@ class DidDocumentImpl implements DidDocument {
protected Set<DidUrl> capabilityDelegation;
protected Set<DidUrl> keyAgreement;

//TODO service

@Override
public JsonObject toJson() {
return toJson(Json.createObjectBuilder()).build();
}

protected JsonObjectBuilder toJson(final JsonObjectBuilder builder) {
//TODO
return builder;
throw new UnsupportedOperationException();
}

@Override
Expand All @@ -55,5 +49,4 @@ public Set<Did> getController() {
public Set<VerificationMethod> getVerificationMethod() {
return verificationMethod;
}

}
2 changes: 1 addition & 1 deletion src/main/java/com/apicatalog/did/DidResolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* Performs {@link Did} resolution by expanding {@link Did} into {@link DidDocument}.
*
* @see {@link https://www.w3.org/TR/did-core/#dfn-did-resolvers}
* @see <a href="https://www.w3.org/TR/did-core/#dfn-did-resolvers">DID resolvers</a>
*/
public interface DidResolver {

Expand Down
9 changes: 5 additions & 4 deletions src/main/java/com/apicatalog/did/key/DidKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
import com.apicatalog.multicodec.Multicodec.Type;

/**
* Immutable DID Key.
*
* https://pr-preview.s3.amazonaws.com/w3c-ccg/did-method-key/pull/51.html
*
* Immutable DID Key
* <p>
* did-key-format := did:key:MULTIBASE(base58-btc, MULTICODEC(public-key-type, raw-public-key-bytes))
* </p>
*
* @see <a href="https://pr-preview.s3.amazonaws.com/w3c-ccg/did-method-key/pull/51.html">DID method key</a>
*
*/
public class DidKey extends Did {
Expand Down
Loading

0 comments on commit 3a20b34

Please sign in to comment.