Skip to content

Commit

Permalink
feat(fido2): allow to update device data in SG authentication respons…
Browse files Browse the repository at this point in the history
…e jans #8116

Signed-off-by: Yuriy Movchan <[email protected]>
  • Loading branch information
yurem committed Mar 22, 2024
1 parent 59695ca commit c32d01b
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
import org.gluu.util.io.ByteDataInputStream;
import org.gluu.util.security.SecurityProviderUtility;
import org.slf4j.Logger;

import com.fasterxml.jackson.core.JsonProcessingException;

import org.gluu.oxauth.model.config.StaticConfiguration;

/**
Expand Down Expand Up @@ -219,7 +222,7 @@ private void prepareForPushTokenChange(DeviceRegistration deviceRegistration) {
try {
deviceNotificationConf = ServerUtil.jsonMapperWithWrapRoot().readValue(deviceNotificationConfString, DeviceNotificationConf.class);
} catch (Exception ex) {
log.error("Failed to parse device notifacation configuration '{}'", deviceNotificationConfString);
log.error("Failed to parse device notification configuration '{}'", deviceNotificationConfString);
}

if (deviceNotificationConf == null) {
Expand All @@ -240,6 +243,12 @@ private void prepareForPushTokenChange(DeviceRegistration deviceRegistration) {
}

snsEndpointArnHistory.add(snsEndpointArn);

try {
deviceRegistration.setDeviceNotificationConf(ServerUtil.jsonMapperWithWrapRoot().writeValueAsString(deviceNotificationConf));
} catch (Exception ex) {
log.error("Failed to update device notification configuration '{}'", deviceNotificationConf);
}
}

public AuthenticateRequest getAuthenticateRequest(AuthenticateRequestMessage requestMessage, AuthenticateResponse response) throws BadInputException {
Expand Down

0 comments on commit c32d01b

Please sign in to comment.