mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 05:01:07 +00:00
CE-609 Restore usage of sessionId cookie/auth-key (used by a test on table-based auth)
This commit is contained in:
@ -475,22 +475,23 @@ public class QJavalinImplementation
|
|||||||
{
|
{
|
||||||
Map<String, String> authenticationContext = new HashMap<>();
|
Map<String, String> authenticationContext = new HashMap<>();
|
||||||
|
|
||||||
// todo delete String sessionIdCookieValue = context.cookie(SESSION_ID_COOKIE_NAME);
|
String sessionIdCookieValue = context.cookie(SESSION_ID_COOKIE_NAME);
|
||||||
String sessionUuidCookieValue = context.cookie(Auth0AuthenticationModule.SESSION_UUID_KEY);
|
String sessionUuidCookieValue = context.cookie(Auth0AuthenticationModule.SESSION_UUID_KEY);
|
||||||
String authorizationHeaderValue = context.header("Authorization");
|
String authorizationHeaderValue = context.header("Authorization");
|
||||||
String apiKeyHeaderValue = context.header("x-api-key");
|
String apiKeyHeaderValue = context.header("x-api-key");
|
||||||
|
|
||||||
/* todo - change to sessionUUID.
|
|
||||||
if(StringUtils.hasContent(sessionIdCookieValue))
|
if(StringUtils.hasContent(sessionIdCookieValue))
|
||||||
{
|
{
|
||||||
////////////////////////////////////////
|
///////////////////////////////////////////////////////
|
||||||
// first, look for a sessionId cookie //
|
// sessionId - maybe used by table-based auth module //
|
||||||
////////////////////////////////////////
|
///////////////////////////////////////////////////////
|
||||||
authenticationContext.put(SESSION_ID_COOKIE_NAME, sessionIdCookieValue);
|
authenticationContext.put(SESSION_ID_COOKIE_NAME, sessionIdCookieValue);
|
||||||
}
|
}
|
||||||
else*/
|
else if(StringUtils.hasContent(sessionUuidCookieValue))
|
||||||
if(StringUtils.hasContent(sessionUuidCookieValue))
|
|
||||||
{
|
{
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// session UUID - known to be used by auth0 module (in aug. 2023 update) //
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
authenticationContext.put(Auth0AuthenticationModule.SESSION_UUID_KEY, sessionUuidCookieValue);
|
authenticationContext.put(Auth0AuthenticationModule.SESSION_UUID_KEY, sessionUuidCookieValue);
|
||||||
}
|
}
|
||||||
else if(apiKeyHeaderValue != null)
|
else if(apiKeyHeaderValue != null)
|
||||||
|
Reference in New Issue
Block a user