|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.security.cas.web.CasAuthenticationEntryPoint
public class 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 CasAuthenticationFilter
,
which will validate the CAS login was successful.
Constructor Summary | |
---|---|
CasAuthenticationEntryPoint()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
void |
commence(javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse response,
AuthenticationException authenticationException)
Commences an authentication scheme. |
protected java.lang.String |
createRedirectUrl(java.lang.String serviceUrl)
Constructs the Url for Redirection to the CAS server. |
protected java.lang.String |
createServiceUrl(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Constructs a new Service Url. |
protected boolean |
getEncodeServiceUrlWithSessionId()
Deprecated. since 3.0.0 because CAS is currently on 3.3.5. |
java.lang.String |
getLoginUrl()
The enterprise-wide CAS login URL. |
ServiceProperties |
getServiceProperties()
|
protected void |
preCommence(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Template method for you to do your own pre-processing before the redirect occurs. |
void |
setEncodeServiceUrlWithSessionId(boolean encodeServiceUrlWithSessionId)
Deprecated. since 3.0.0 because CAS is currently on 3.3.5. |
void |
setLoginUrl(java.lang.String loginUrl)
|
void |
setServiceProperties(ServiceProperties serviceProperties)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CasAuthenticationEntryPoint()
Method Detail |
---|
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
public final void commence(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse response, AuthenticationException authenticationException) throws java.io.IOException, javax.servlet.ServletException
AuthenticationEntryPoint
ExceptionTranslationFilter
will populate the HttpSession
attribute named
AbstractAuthenticationProcessingFilter.SPRING_SECURITY_SAVED_REQUEST_KEY
with the requested target URL before
calling this method.
Implementations should modify the headers on the ServletResponse
as necessary to
commence the authentication process.
commence
in interface AuthenticationEntryPoint
servletRequest
- that resulted in an AuthenticationException
response
- so that the user agent can begin authenticationauthenticationException
- that caused the invocation
java.io.IOException
javax.servlet.ServletException
protected java.lang.String createServiceUrl(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
request
- the HttpServletRequestresponse
- the HttpServlet Response
protected java.lang.String createRedirectUrl(java.lang.String serviceUrl)
serviceUrl
- the service url that should be included.
protected void preCommence(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
request
- the HttpServletRequestresponse
- the HttpServletResponsepublic final java.lang.String getLoginUrl()
https://www.mycompany.com/cas/login
.
public final ServiceProperties getServiceProperties()
public final void setLoginUrl(java.lang.String loginUrl)
public final void setServiceProperties(ServiceProperties serviceProperties)
@Deprecated public final void setEncodeServiceUrlWithSessionId(boolean encodeServiceUrlWithSessionId)
encodeServiceUrlWithSessionId
- whether to encode the service url with the session id or not.@Deprecated protected boolean getEncodeServiceUrlWithSessionId()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |