Skip to content

Commit

Permalink
feat: #836 support push token update on finish authentication (#837)
Browse files Browse the repository at this point in the history
  • Loading branch information
maduvena authored Feb 17, 2022
1 parent c8f4b19 commit 4d6d916
Showing 1 changed file with 15 additions and 2 deletions.
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

0 comments on commit 4d6d916

Please sign in to comment.