Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: #836 support push token update on finish authentication #837

Merged
merged 1 commit into from
Feb 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.jans.as.model.fido.u2f.exception.BadInputException;
import org.jboss.resteasy.annotations.providers.jaxb.IgnoreMediaTypes;
Expand Down Expand Up @@ -43,13 +44,25 @@ public class AuthenticateResponse implements Serializable {
/* keyHandle originally passed */
@JsonProperty
private final String keyHandle;

/**
* base64(UTF8(device data))
*/
@JsonProperty
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private final String deviceData;

public String getDeviceData() {
return deviceData;
}

public AuthenticateResponse(@JsonProperty("clientData") String clientData, @JsonProperty("signatureData") String signatureData,
@JsonProperty("keyHandle") String keyHandle) throws BadInputException {
@JsonProperty("keyHandle") String keyHandle, @JsonProperty("deviceData") String deviceData) throws BadInputException {
this.clientData = clientData;
this.signatureData = signatureData;
this.keyHandle = keyHandle;
this.clientDataRef = new ClientData(clientData);
this.deviceData = deviceData;
}

public ClientData getClientData() {
Expand All @@ -76,7 +89,7 @@ public String getRequestId() {
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("AuthenticateResponse [clientData=").append(clientData).append(", signatureData=").append(signatureData).append(", keyHandle=")
builder.append("AuthenticateResponse [clientData=").append(clientData).append(", signatureData=").append(signatureData).append(" , deviceData=").append(deviceData).append(", keyHandle=")
.append(keyHandle).append("]");
return builder.toString();
}
Expand Down