Class SpringCasAuthenticationEntryPoint
java.lang.Object
com.wavemaker.runtime.security.provider.cas.SpringCasAuthenticationEntryPoint
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean,org.springframework.security.web.AuthenticationEntryPoint
- Direct Known Subclasses:
WMCASAuthenticationEntryPoint
public class SpringCasAuthenticationEntryPoint
extends Object
implements org.springframework.security.web.AuthenticationEntryPoint, org.springframework.beans.factory.InitializingBean
Copied from
CasAuthenticationEntryPoint
Used by the ExceptionTranslationFilter to commence authentication via the JA-SIG Central
Authentication Service (CAS).
The user's browser will be redirected to the JA-SIG CAS enterprise-wide login page.
This page is specified by the loginUrl property. Once login is complete, the CAS login page will
redirect to the page indicated by the service property. The service is a HTTP URL
belonging to the current application. The service URL is monitored by the
,
which will validate the CAS login was successful.invalid reference
CasAuthenticationFilter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcommence(jakarta.servlet.http.HttpServletRequest servletRequest, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException authenticationException) protected StringcreateRedirectUrl(String serviceUrl) Constructs the Url for Redirection to the CAS server.protected StringcreateServiceUrl(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Constructs a new Service Url.protected booleanDeprecated.since 3.0.0 because CAS is currently on 3.3.5.final StringThe enterprise-wide CAS login URL.final org.springframework.security.cas.ServicePropertiesprotected voidpreCommence(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Template method for you to do your own pre-processing before the redirect occurs.final voidsetEncodeServiceUrlWithSessionId(boolean encodeServiceUrlWithSessionId) Deprecated.since 3.0.0 because CAS is currently on 3.3.5.final voidsetLoginUrl(String loginUrl) final voidsetServiceProperties(org.springframework.security.cas.ServiceProperties serviceProperties)
-
Constructor Details
-
SpringCasAuthenticationEntryPoint
public SpringCasAuthenticationEntryPoint()
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
commence
public void commence(jakarta.servlet.http.HttpServletRequest servletRequest, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException authenticationException) throws IOException, jakarta.servlet.ServletException - Specified by:
commencein interfaceorg.springframework.security.web.AuthenticationEntryPoint- Throws:
IOExceptionjakarta.servlet.ServletException
-
createServiceUrl
protected String createServiceUrl(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Constructs a new Service Url. The default implementation relies on the CAS client to do the bulk of the work.- Parameters:
request- the HttpServletRequestresponse- the HttpServlet Response- Returns:
- the constructed service url. CANNOT be NULL.
-
createRedirectUrl
Constructs the Url for Redirection to the CAS server. Default implementation relies on the CAS client to do the bulk of the work.- Parameters:
serviceUrl- the service url that should be included.- Returns:
- the redirect url. CANNOT be NULL.
-
preCommence
protected void preCommence(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Template method for you to do your own pre-processing before the redirect occurs.- Parameters:
request- the HttpServletRequestresponse- the HttpServletResponse
-
getLoginUrl
The enterprise-wide CAS login URL. Usually something likehttps://www.mycompany.com/cas/login.- Returns:
- the enterprise-wide CAS login URL
-
getServiceProperties
public final org.springframework.security.cas.ServiceProperties getServiceProperties() -
setLoginUrl
-
setServiceProperties
public final void setServiceProperties(org.springframework.security.cas.ServiceProperties serviceProperties) -
setEncodeServiceUrlWithSessionId
@Deprecated public final void setEncodeServiceUrlWithSessionId(boolean encodeServiceUrlWithSessionId) Deprecated.since 3.0.0 because CAS is currently on 3.3.5.Sets whether to encode the service url with the session id or not.- Parameters:
encodeServiceUrlWithSessionId- whether to encode the service url with the session id or not.
-
getEncodeServiceUrlWithSessionId
Deprecated.since 3.0.0 because CAS is currently on 3.3.5.Sets whether to encode the service url with the session id or not.- Returns:
- whether to encode the service url with the session id or not.
-