(Quick Reference)

12 URL Properties - Reference Documentation

Authors: Burt Beckwith, Beverley Talbott

Version: 2.0.0

12 URL Properties

The table shows configurable URL-related properties.

PropertyDefault ValueMeaning
apf.filterProcessesUrl'/j_spring_security_check'Login form post URL, intercepted by Spring Security filter.
apf.usernameParameter'j_username'Login form username parameter.
apf.passwordParameter'j_password'Login form password parameter.
apf.allowSessionCreationtrueWhether to allow authentication to create an HTTP session.
apf.postOnlytrueWhether to allow only POST login requests.
apf.continueChainBefore SuccessfulAuthenticationfalsewhether to continue calling subsequent filters in the filter chain
apf.storeLastUsernamefalseWhether to store the login username in the HTTP session
failureHandler. defaultFailureUrl'/login/authfail?login_error=1'Redirect URL for failed logins.
failureHandler. ajaxAuthFailUrl'/login/authfail?ajax=true'Redirect URL for failed Ajax logins.
failureHandler. exceptionMappingsnoneMap of exception class name (subclass of AuthenticationException) to which the URL will redirect for that exception type after authentication failure.
failureHandler. useForwardfalseWhether to render the error page (true) or redirect (false).
failureHandler. allowSessionCreationtrueWhether to enable session creation to store the authentication failure exception
successHandler. defaultTargetUrl'/'Default post-login URL if there is no saved request that triggered the login.
successHandler. alwaysUseDefaultfalseIf true, always redirects to the value of successHandler. defaultTargetUrl after successful authentication; otherwise redirects to to originally-requested page.
successHandler. targetUrlParameter'spring-security-redirect'Name of optional login form parameter that specifies destination after successful login.
successHandler. useRefererfalseWhether to use the HTTP Referer header to determine post-login destination.
successHandler. ajaxSuccessUrl'/login/ajaxSuccess'URL for redirect after successful Ajax login.
auth.loginFormUrl'/login/auth'URL of login page.
auth.forceHttpsfalseIf true, redirects login page requests to HTTPS.
auth.ajaxLoginFormUrl'/login/authAjax'URL of Ajax login page.
auth.useForwardfalseWhether to render the login page (true) or redirect (false).
logout.afterLogoutUrl'/'URL for redirect after logout.
logout.filterProcessesUrl'/j_spring_security_logout'Logout URL, intercepted by Spring Security filter.
logout.handlerNames['rememberMeServices', 'securityContextLogoutHandler']Logout handler bean names. See Logout Handlers
logout.clearAuthenticationtrueIf true removes the Authentication from the SecurityContext to prevent issues with concurrent requests
logout.invalidateHttpSessiontrueWhether to invalidate the HTTP session when logging out
logout.targetUrlParameternonethe querystring parameter name for the post-logout URL
logout. alwaysUseDefaultTargetUrlfalsewhether to always use the afterLogoutUrl as the post-logout URL
logout.redirectToRefererfalsewhether to use the Referer header value as the post-logout URL
logout.postOnlytrueIf true only POST requests will be allowed to logout
adh.errorPage'/login/denied'Location of the 403 error page (or set to null to send a 403 error and not render a page).
adh.ajaxErrorPage'/login/ajaxDenied'Location of the 403 error page for Ajax requests.
adh.useForwardtrueIf true a forward will be used to render the error page, otherwise a redirect is used
ajaxHeader'X-Requested-With'Header name sent by Ajax library, used to detect Ajax.
ajaxCheckClosurenoneAn optional closure that can determine if a request is Ajax
redirectStrategy. contextRelativefalseIf true, the redirect URL will be the value after the request context path. This results in the loss of protocol information (HTTP or HTTPS), so causes problems if a redirect is being performed to change from HTTP to HTTPS or vice versa.
switchUser URLs See Switch User, under Customizing URLs.
fii.alwaysReauthenticatefalseIf true, re-authenticates when there is a Authentication in the SecurityContext
fii.rejectPublicInvocationstrueDisallow URL access when there is no request mapping
fii.validateConfigAttributestrueWhether to check that all ConfigAttribute instances are valid at startup
fii.publishAuthorizationSuccessfalseWhether to publish an AuthorizedEvent after successful access check
fii.observeOncePerRequesttrueIf false allow checks to happen multiple times, for example when JSP forwards are being used and filter security is desired on each included fragment of the HTTP request