Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KNOX-3077 - Add pac4j.cookie.max.age param #972

Merged
merged 3 commits into from
Jan 8, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
KNOX-3077 - Review changes
  • Loading branch information
moresandeep committed Dec 13, 2024
commit de3d5fc0494afb4896c12c08bdeb148bbe691836
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public class Pac4jDispatcherFilter implements Filter, SessionInvalidator {
public static final String PAC4J_COOKIE_MAX_AGE = "pac4j.cookie.max.age";

/* default value is same is KNOXSSO token ttl default */
public static final int PAC4J_COOKIE_MAX_AGE_DEFAULT = -1;
private static final String PAC4J_COOKIE_MAX_AGE_DEFAULT = "-1";

private CallbackFilter callbackFilter;

Expand Down Expand Up @@ -223,7 +223,7 @@ public void init( FilterConfig filterConfig ) throws ServletException {
/* do we need to exclude custom attributes? */
setSessionStoreConfig(filterConfig, PAC4J_SESSION_STORE_EXCLUDE_CUSTOM_ATTRIBUTES, PAC4J_SESSION_STORE_EXCLUDE_CUSTOM_ATTRIBUTES_DEFAULT);
/* add cookie expiry */
setSessionStoreConfig(filterConfig, PAC4J_COOKIE_MAX_AGE, Long.toString(PAC4J_COOKIE_MAX_AGE_DEFAULT));
setSessionStoreConfig(filterConfig, PAC4J_COOKIE_MAX_AGE, PAC4J_COOKIE_MAX_AGE_DEFAULT);
//decorating client configuration (if needed)
PAC4J_CLIENT_CONFIGURATION_DECORATOR.decorateClients(clients, properties);
}
Expand Down
Loading