Skip to content

Commit

Permalink
Fixed consent data update.
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriyz committed Sep 25, 2020
1 parent 4402018 commit 541efb3
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.gluu.oxauth.service.ClientService;
import org.gluu.oxauth.service.CookieService;
import org.gluu.oxauth.service.SessionIdService;
import org.gluu.persist.exception.EntryPersistenceException;
import org.slf4j.Logger;

import javax.ejb.Stateless;
Expand Down Expand Up @@ -106,14 +107,22 @@ public boolean isSessionStateAuthenticated(HttpServletRequest httpRequest) {

public boolean persist(SessionId session) {
try {
if (sessionIdService.persistSessionId(session, true)) {
log.trace("Session persisted successfully. Session: " + session);
if (sessionIdService.updateSessionId(session, true)) {
log.trace("Session updated successfully. Session: " + session);
return true;
}
} catch (EntryPersistenceException e) {
try {
if (sessionIdService.persistSessionId(session, true)) {
log.trace("Session persisted successfully. Session: " + session);
return true;
}
} catch (Exception ex) {
log.error("Failed to persist session, id: " + session.getId(), ex);
}
} catch (Exception e) {
log.error("Failed to persist session, id: " + session.getId(), e);
}

return false;
}

Expand Down

0 comments on commit 541efb3

Please sign in to comment.