Skip to content

Commit

Permalink
Merge 18bbb2f into ef760b8
Browse files Browse the repository at this point in the history
  • Loading branch information
emlun committed Oct 1, 2019
2 parents ef760b8 + 18bbb2f commit f48a840
Show file tree
Hide file tree
Showing 14 changed files with 130 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ target/

# Gradle
.gradle/
/build/
/*/build/
build/
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ subprojects {
}
}

evaluationDependsOnChildren()
allprojects {
evaluationDependsOnChildren()
}

task assembleJavadoc(type: Sync) {
from("docs/index.html") {
Expand Down
4 changes: 4 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ include ':webauthn-server-core'
include ':webauthn-server-demo'
include ':yubico-util'
include ':yubico-util-scala'

include ':test-dependent-projects:java-dep-webauthn-server-attestation'
include ':test-dependent-projects:java-dep-webauthn-server-core'
include ':test-dependent-projects:java-dep-yubico-util'
4 changes: 4 additions & 0 deletions test-dependent-projects/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
plugins {
// This is needed because the root project needs the sourceCompatibility property to exist.
`java-library`
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
plugins {
`java-library`
}

dependencies {
implementation(project(":webauthn-server-attestation"))
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.yubico.test.compilability;

import com.yubico.webauthn.attestation.AttestationResolver;
import java.security.cert.X509Certificate;
import java.util.List;
import java.util.Optional;

public class ThisShouldCompile {

public AttestationResolver getResolver() {
return new AttestationResolver() {
@Override
public Optional<com.yubico.webauthn.attestation.Attestation> resolve(X509Certificate attestationCertificate, List<X509Certificate> certificateChain) {
return Optional.empty();
}

@Override
public com.yubico.webauthn.attestation.Attestation untrustedFromCertificate(X509Certificate attestationCertificate) {
return null;
}
};
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
plugins {
`java-library`
}

dependencies {
implementation(project(":webauthn-server-core"))
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package com.yubico.test.compilability;

import com.yubico.webauthn.CredentialRepository;
import com.yubico.webauthn.RegisteredCredential;
import com.yubico.webauthn.RelyingParty;
import com.yubico.webauthn.data.ByteArray;
import com.yubico.webauthn.data.PublicKeyCredentialDescriptor;
import com.yubico.webauthn.data.PublicKeyCredentialType;
import com.yubico.webauthn.data.RelyingPartyIdentity;
import java.util.Optional;
import java.util.Set;

public class ThisShouldCompile {

public RelyingParty getRp() {
return RelyingParty.builder()
.identity(RelyingPartyIdentity.builder()
.id("localhost")
.name("Example RP")
.build())
.credentialRepository(new CredentialRepository() {
@Override public Set<PublicKeyCredentialDescriptor> getCredentialIdsForUsername(String username) { return null; }
@Override public Optional<ByteArray> getUserHandleForUsername(String username) { return Optional.empty(); }
@Override public Optional<String> getUsernameForUserHandle(ByteArray userHandle) { return Optional.empty(); }
@Override public Optional<RegisteredCredential> lookup(ByteArray credentialId, ByteArray userHandle) { return Optional.empty(); }
@Override public Set<RegisteredCredential> lookupAll(ByteArray credentialId) { return null; }
})
.build();
}

public ByteArray getByteArray() {
ByteArray a = new ByteArray(new byte[] {1, 2, 3, 4});
byte[] b = a.getBytes();
return a;
}

public PublicKeyCredentialType getPublicKeyCredentialType() {
PublicKeyCredentialType a = PublicKeyCredentialType.PUBLIC_KEY;
String b = a.toJsonString();
return a;
}


}
8 changes: 8 additions & 0 deletions test-dependent-projects/java-dep-yubico-util/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
plugins {
`java-library`
}

dependencies {
implementation(project(":yubico-util"))
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.yubico.test.compilability;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.yubico.internal.util.JacksonCodecs;

public class ThisShouldCompile {

public String getEncodedValue() throws JsonProcessingException {
return JacksonCodecs.json().writeValueAsString("hej");
}

}
5 changes: 4 additions & 1 deletion webauthn-server-attestation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ evaluationDependsOn(':webauthn-server-core')

dependencies {

implementation(
api(
project(':webauthn-server-core'),
)

implementation(
project(':yubico-util'),
'com.fasterxml.jackson.core:jackson-databind:2.9.9.3',
'com.google.guava:guava:19.0',
Expand Down
5 changes: 4 additions & 1 deletion webauthn-server-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ project.ext.publishMe = true

dependencies {

implementation(
api(
project(':yubico-util'),
)

implementation(
'com.augustcellars.cose:cose-java:0.9.10',
'com.fasterxml.jackson.core:jackson-databind:2.9.9.3',
'com.google.guava:guava:19.0',
Expand Down
2 changes: 1 addition & 1 deletion webauthn-server-demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies {

'com.fasterxml.jackson.core:jackson-databind:2.9.9.3',
'com.google.guava:guava:19.0',
'com.upokecenter:cbor:2.4.1',
'com.upokecenter:cbor:3.6.0',
'javax.ws.rs:javax.ws.rs-api:2.1',
'org.eclipse.jetty:jetty-server:9.4.9.v20180320',
'org.eclipse.jetty:jetty-servlet:9.4.9.v20180320',
Expand Down
6 changes: 5 additions & 1 deletion yubico-util/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ project.ext.publishMe = true

dependencies {

api(
'com.fasterxml.jackson.core:jackson-databind:2.9.9.3',
)

implementation(
'com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.9.9',
'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.9',
'com.upokecenter:cbor:2.4.1',
'com.upokecenter:cbor:3.6.0',
'org.bouncycastle:bcprov-jdk15on:1.62',
'org.slf4j:slf4j-api:1.7.25',
)
Expand Down

0 comments on commit f48a840

Please sign in to comment.