Skip to content

Commit 2c9b6b2

Browse files
committed
Release 0.6.0
Breaking changes: - Classes moved from package `com.yubico.webauthn.data` to `com.yubico.webauthn`: - `AssertionRequest` - `AssertionResult` - `RegistrationResult` - All public classes are now final. - All builders now enforce mandatory arguments at compile time. Some usages may therefore need to adjust the order of calls on the builder instance. - Static method `Attestation.trusted(boolean)` replaced with `.builder()` with `.trusted(boolean)` as builder method instead - `AuthenticatorAssertionResponse` constructor is now private. - `AuthenticatorAttestationResponse` constructor is now private. - `PublicKeyCredentialDescriptor` constructor is now private. - `PublicKeyCredentialRequestOptions` constructor is now private. - All classes that take collections as constructor (builder) arguments now make shallow copies of those collections, so that mutations of the collections don't propagate into the class instance. - Deleted interface `Crypto` and constructor parameter `crypto` of `RelyingParty` - Deleted interface `ChallengeGenerator` and constructor parameter `challengeGenerator` of `RelyingParty` - Updated implementation to agree with current editor's draft of the spec - Renamed class `AttestationData` to `AttestedCredentialData` - Enum constant `TokenBindingStatus.NOT_SUPPORTED` deleted; this is now instead signaled by a missing value - Parameter `RelyingParty.allowMissingTokenBinding` therefore removed - Enum constant `AttestationType.PRIVACY_CA` renamed to `ATTESTATION_CA` - Renamed class `AuthenticationDataFlags` to `AuthenticatorDataFlags` - Deleted constant `UserVerificationRequirement.DEFAULT` - Deleted method `AttestationObject.getAuthData()` - Changed type of field `RelyingParty.origins` from `List` to `Set` - Fixed (reduced) visibility of `RegisteredCredential` fields - Class `MetadataObject` moved to `webauthn-server-attestation` module - Updated and greatly expanded Javadoc New features: - Constructor parameter `pubKeyCredParams` of `RelyingParty` is now optional with a default value. - Constructor parameter `origins` of `RelyingParty` is now optional and defaults to a list whose only element is the RP ID prefixed with `https://`. - All classes with a builder now also have a `.toBuilder()` method.
2 parents 9c27b3b + e65ffed commit 2c9b6b2

File tree

122 files changed

+3160
-1117
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+3160
-1117
lines changed

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "lombok"]
2+
path = lombok
3+
url = https://github.com/emlun/lombok.git
4+
branch = builder-javadoc

.travis.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
language: java
2+
3+
env:
4+
global:
5+
secure: sX5sJd2EUgzIT7uQN0YxA3faVHymBG/QPZ/St5IPqoQIXjZAMYBM0D1MrVOYaSOhgVKOJt+5vwCYU7MlY9Ha0rUPJgUPT+6CkVgUVCsQ1e8srAzaYp4ceIYaW2XpUIwhKHPBezulV3nLANRs0FibEN+eqTgL5A/qKtsU49BtQ1iUAVFFOzGcR48avo1UYxS0FLw+7MRLgH5NA6KJVHiGChx9P3oLYAhPylgDzRv6iFf5H5v9azQI4eLo6bSQwm++j0UpH4t8m+at7eGuzNsadYY0M9SoUwuJxQZiwtImYJJtGJD92QtV9m+yny4+RocXchgZDj3e9vx06ZqXaeF3U3o49YUX5ACerVV12yOxGZsuuxfevaQa9Mk4xEOwGkhva5I+8vfo8MRxm7ymelExn25zpsMlmj6GjBio3z1q/FGYdyXrcGoVNrvAgozs+0yW2jYtDVo7DNu8J2mur/C/gmi+xA6rkuEJQIQ3hWuWYVe7DUzdii5MG9/9AdwI14b3uyezh1EJ8tza5MScDQijTvD9sGxarruKS59VuJapqrJSU5E87CnlU6gQx7qXJVGvpTXZOw7ZzsdszSDQ3Jc9uNBSdtBQ2i7egEyTE+RQWsdtje/H0s3ZYyIw8qrQ1kIUDQKk7jl8Uvwf+zn/36JBgZMVIIO0hmDFnyB9wBGd7lk=
6+
27
jdk:
38
- openjdk8
49
- oraclejdk8
10+
11+
script:
12+
- ./gradlew check assembleJavadoc
13+
514
after_success:
615
- ./gradlew coveralls
716

8-
addons:
9-
hosts:
10-
- travis-issue-5227-workaround
11-
hostname: travis-issue-5227-workaround
17+
deploy:
18+
provider: pages
19+
skip-cleanup: true
20+
github-token: $PAGES_DEPLOY_KEY
21+
on:
22+
branch: master
23+
local-dir: 'build/javadoc'

NEWS

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,51 @@
1+
== Version 0.6.0 (unreleased) ==
2+
3+
=== `webauthn-server-core` ===
4+
5+
Breaking changes:
6+
7+
* Classes moved from package `com.yubico.webauthn.data` to `com.yubico.webauthn`:
8+
** `AssertionRequest`
9+
** `AssertionResult`
10+
** `RegistrationResult`
11+
* All public classes are now final.
12+
* All builders now enforce mandatory arguments at compile time. Some usages may
13+
therefore need to adjust the order of calls on the builder instance.
14+
** Static method `Attestation.trusted(boolean)` replaced with `.builder()` with
15+
`.trusted(boolean)` as builder method instead
16+
** `AuthenticatorAssertionResponse` constructor is now private.
17+
** `AuthenticatorAttestationResponse` constructor is now private.
18+
** `PublicKeyCredentialDescriptor` constructor is now private.
19+
** `PublicKeyCredentialRequestOptions` constructor is now private.
20+
* All classes that take collections as constructor (builder) arguments now make
21+
shallow copies of those collections, so that mutations of the collections
22+
don't propagate into the class instance.
23+
* Deleted interface `Crypto` and constructor parameter `crypto` of `RelyingParty`
24+
* Deleted interface `ChallengeGenerator` and constructor parameter
25+
`challengeGenerator` of `RelyingParty`
26+
* Updated implementation to agree with current editor's draft of the spec
27+
** Renamed class `AttestationData` to `AttestedCredentialData`
28+
** Enum constant `TokenBindingStatus.NOT_SUPPORTED` deleted; this is now
29+
instead signaled by a missing value
30+
** Parameter `RelyingParty.allowMissingTokenBinding` therefore removed
31+
** Enum constant `AttestationType.PRIVACY_CA` renamed to `ATTESTATION_CA`
32+
* Renamed class `AuthenticationDataFlags` to `AuthenticatorDataFlags`
33+
* Deleted constant `UserVerificationRequirement.DEFAULT`
34+
* Deleted method `AttestationObject.getAuthData()`
35+
* Changed type of field `RelyingParty.origins` from `List` to `Set`
36+
* Fixed (reduced) visibility of `RegisteredCredential` fields
37+
* Class `MetadataObject` moved to `webauthn-server-attestation` module
38+
* Updated and greatly expanded Javadoc
39+
40+
New features:
41+
42+
* Constructor parameter `pubKeyCredParams` of `RelyingParty` is now optional
43+
with a default value.
44+
* Constructor parameter `origins` of `RelyingParty` is now optional and defaults
45+
to a list whose only element is the RP ID prefixed with `https://`.
46+
* All classes with a builder now also have a `.toBuilder()` method.
47+
48+
149
== Version 0.5.0 ==
250

351
=== `webauthn-server-core` ===

README

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ authenticators and authenticating registered authenticators.
1717
=== Planned breaking changes
1818

1919
* Update spec version from Candidate Recommendation 2018-03-20 to Proposed
20-
Recommendation 2018-11-??. This will involve renaming a couple of classes
21-
and methods.
20+
Recommendation 2018-12-??. This will include at least:
21+
** Renaming class `AttestationData` to `AttestedCredentialData`
22+
** Deleting enum value `TokenBindingStatus.NOT_SUPPORTED` and constructor
23+
`TokenBindingInfo.notSupported()`
2224

2325

2426
=== Example Usage

build.gradle

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ buildscript {
1212
plugins {
1313
id 'com.github.kt3k.coveralls' version '2.8.1'
1414
id 'io.codearte.nexus-staging' version '0.9.0'
15-
id 'net.researchgate.release' version '2.4.0'
15+
id 'io.franzbecker.gradle-lombok' version '1.14'
1616
}
1717

18+
import io.franzbecker.gradle.lombok.LombokPlugin
19+
import io.franzbecker.gradle.lombok.task.DelombokTask
20+
1821
project.ext.isCiBuild = System.env.CI == 'true'
1922

2023
project.ext.publishEnabled = !isCiBuild &&
@@ -40,12 +43,25 @@ allprojects {
4043
apply plugin: 'com.cinnober.gradle.semver-git'
4144
apply plugin: 'java'
4245
apply plugin: 'idea'
46+
apply plugin: LombokPlugin
4347

4448
group = 'com.yubico'
4549

4650
sourceCompatibility = 1.8
4751
targetCompatibility = 1.8
4852

53+
lombok {
54+
version '1.18.4'
55+
sha256 = '39f3922deb679b1852af519eb227157ef2dd0a21eec3542c8ce1b45f2df39742'
56+
}
57+
configurations.all {
58+
resolutionStrategy {
59+
dependencySubstitution {
60+
substitute module('org.projectlombok:lombok') with module('com.yubico:lombok:1.18.5-custom')
61+
}
62+
}
63+
}
64+
4965
tasks.withType(JavaCompile) {
5066
options.encoding = 'UTF-8'
5167
}
@@ -57,6 +73,7 @@ allprojects {
5773
repositories {
5874
mavenLocal()
5975

76+
maven { url uri("${rootProject.projectDir}/lib") }
6077
maven { url "http://repo.maven.apache.org/maven2" }
6178
}
6279

@@ -74,23 +91,55 @@ allprojects {
7491

7592
evaluationDependsOnChildren()
7693

77-
subprojects {
94+
task assembleJavadoc(type: Sync) {
95+
from("docs/index.html") {
96+
expand project.properties
97+
}
98+
destinationDir = file("${rootProject.buildDir}/javadoc")
99+
}
100+
101+
subprojects { project ->
78102
task packageSources(type: Jar) {
79103
classifier = 'sources'
80104
from sourceSets.main.allSource
81105
}
82106
artifacts.archives packageSources
83107

108+
task delombok(type: DelombokTask, dependsOn: classes) {
109+
ext.outputDir = file("${buildDir}/delombok")
110+
outputs.dir outputDir
111+
sourceSets.main.java.srcDirs.each {
112+
inputs.dir it
113+
args(it, '-d', outputDir)
114+
}
115+
doFirst {
116+
outputDir.deleteDir()
117+
}
118+
}
119+
120+
javadoc {
121+
dependsOn delombok
122+
source = delombok.outputDir
123+
options.encoding = 'UTF-8'
124+
options.addStringOption('charset', 'UTF-8')
125+
}
126+
84127
task packageJavadoc(type: Jar) {
85128
classifier = 'javadoc'
86129
inputs.files javadoc.outputs
87130
from javadoc.destinationDir
88131
}
89132
artifacts.archives packageJavadoc
90133

91-
dependencies {
134+
rootProject.tasks.assembleJavadoc {
135+
dependsOn javadoc
136+
inputs.dir javadoc.destinationDir
137+
from(javadoc.destinationDir) {
138+
into project.name
139+
}
140+
}
92141

93-
compileOnly 'org.projectlombok:lombok:1.18.2'
142+
dependencies {
94143

95144
compile(
96145
'org.slf4j:slf4j-api:1.7.25',

docs/index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
2+
<html lang="en">
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5+
<title>Javadoc index - java-webauthn-server ${version}</title>
6+
<link rel="stylesheet" type="text/css" href="webauthn-server-core/stylesheet.css" title="Style">
7+
</head>
8+
<body style="padding: 1em 2em">
9+
<h2>Modules:</h2>
10+
<ul>
11+
<li><a href="webauthn-server-attestation/">webauthn-server-attestation</a></li>
12+
<li><a href="webauthn-server-core/">webauthn-server-core</a></li>
13+
</ul>
14+
</body>
15+
</html>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Custom Lombok build that also copies javadoc from field definitions to builder
2+
setters.
3+
4+
Build using the `lombok` submodule. Building Lombok requires JDK 10, therefore
5+
it is not integrated directly into the Gradle build. It is built as such:
6+
7+
```
8+
$ git submodule update --init
9+
$ cd lombok
10+
$ ant setupJavaOracle8TestEnvironment
11+
$ rm ../lombok.config
12+
$ ant test
13+
$ ant dist
14+
$ cp dist/lombok-1.18.5.jar ../lib/com/yubico/lombok/1.18.5-custom/lombok-1.18.5-custom.jar
15+
$ cd ..
16+
$ git checkout -- lombok.config
17+
```
Binary file not shown.

lombok

Submodule lombok added at 2a2350f

webauthn-server-core/src/main/java/com/yubico/webauthn/attestation/MetadataObject.java renamed to webauthn-server-attestation/src/main/java/com/yubico/webauthn/attestation/MetadataObject.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
@Slf4j
5050
@JsonIgnoreProperties(ignoreUnknown = true)
5151
@EqualsAndHashCode(of = { "data" }, callSuper = false)
52-
public class MetadataObject {
52+
public final class MetadataObject {
5353
private static final ObjectMapper OBJECT_MAPPER = WebAuthnCodecs.json();
5454

5555
private static final TypeReference<Map<String, String>> MAP_STRING_STRING_TYPE = new TypeReference<Map<String, String>>() {

0 commit comments

Comments
 (0)