Skip to content

Commit

Permalink
[#192] FIX In the ThreadLocalAMTokenCache, a session entry is being s…
Browse files Browse the repository at this point in the history
…et over an existing session (#684)
  • Loading branch information
vharseko authored Dec 11, 2023
1 parent 7864e65 commit b3c09ac
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ private AMSessionCacheEntry(String sessionId, boolean invalidateAfterTokenCreati
* @throws TokenValidationException if there was a previous cached session - an illegal state.
*/
void setSessionEntry(String sessionId, boolean invalidateAfterTokenCreation) throws TokenValidationException {
if (sessionEntry != null) {
throw new TokenValidationException(ResourceException.INTERNAL_ERROR, "In the ThreadLocalAMTokenCache, " +
"a session entry is being set over an existing session entry. Illegal state!");
}
sessionEntry = new AMSessionCacheEntry(sessionId, invalidateAfterTokenCreation);
}

Expand All @@ -75,10 +71,6 @@ AMSessionCacheEntry getSessionEntry() {
* @throws TokenValidationException if there was a previous cached session - an illegal state.
*/
void setDelegatedSessionEntry(String delegatedSessionId, boolean invalidateAfterTokenCreation) throws TokenValidationException {
if (delegatedSessionEntry != null) {
throw new TokenValidationException(ResourceException.INTERNAL_ERROR, "In the ThreadLocalAMTokenCache, " +
"a delegated session entry is being set over an existing delegated session entry. Illegal state!");
}
delegatedSessionEntry = new AMSessionCacheEntry(delegatedSessionId, invalidateAfterTokenCreation);
}

Expand Down

0 comments on commit b3c09ac

Please sign in to comment.