-
Notifications
You must be signed in to change notification settings - Fork 135
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
Showing
14 changed files
with
130 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,5 +19,4 @@ target/ | |
|
||
# Gradle | ||
.gradle/ | ||
/build/ | ||
/*/build/ | ||
build/ |
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,4 @@ | ||
plugins { | ||
// This is needed because the root project needs the sourceCompatibility property to exist. | ||
`java-library` | ||
} |
8 changes: 8 additions & 0 deletions
8
test-dependent-projects/java-dep-webauthn-server-attestation/build.gradle.kts
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,8 @@ | ||
plugins { | ||
`java-library` | ||
} | ||
|
||
dependencies { | ||
implementation(project(":webauthn-server-attestation")) | ||
} | ||
|
24 changes: 24 additions & 0 deletions
24
...thn-server-attestation/src/main/java/com/yubico/test/compilability/ThisShouldCompile.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,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; | ||
} | ||
}; | ||
} | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
test-dependent-projects/java-dep-webauthn-server-core/build.gradle.kts
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,8 @@ | ||
plugins { | ||
`java-library` | ||
} | ||
|
||
dependencies { | ||
implementation(project(":webauthn-server-core")) | ||
} | ||
|
44 changes: 44 additions & 0 deletions
44
...p-webauthn-server-core/src/main/java/com/yubico/test/compilability/ThisShouldCompile.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,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
8
test-dependent-projects/java-dep-yubico-util/build.gradle.kts
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,8 @@ | ||
plugins { | ||
`java-library` | ||
} | ||
|
||
dependencies { | ||
implementation(project(":yubico-util")) | ||
} | ||
|
12 changes: 12 additions & 0 deletions
12
...s/java-dep-yubico-util/src/main/java/com/yubico/test/compilability/ThisShouldCompile.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,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"); | ||
} | ||
|
||
} |
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
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