Class DigestAuthenticationEntryPoint
- java.lang.Object
- 
- org.springframework.security.web.authentication.www.DigestAuthenticationEntryPoint
 
- 
- All Implemented Interfaces:
- org.springframework.beans.factory.InitializingBean,- org.springframework.core.Ordered,- AuthenticationEntryPoint
 
 public class DigestAuthenticationEntryPoint extends java.lang.Object implements AuthenticationEntryPoint, org.springframework.beans.factory.InitializingBean, org.springframework.core.Ordered Used by theSecurityEnforcementFilterto commence authentication via theDigestAuthenticationFilter.The nonce sent back to the user agent will be valid for the period indicated by setNonceValiditySeconds(int). By default this is 300 seconds. Shorter times should be used if replay attacks are a major concern. Larger values can be used if performance is a greater concern. This class correctly presents thestale=trueheader when the nonce has expired, so properly implemented user agents will automatically renegotiate with a new nonce value (i.e. without presenting a new password dialog box to the user).
- 
- 
Constructor SummaryConstructors Constructor Description DigestAuthenticationEntryPoint()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()voidcommence(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AuthenticationException authException)Commences an authentication scheme.java.lang.StringgetKey()intgetNonceValiditySeconds()intgetOrder()java.lang.StringgetRealmName()voidsetKey(java.lang.String key)voidsetNonceValiditySeconds(int nonceValiditySeconds)voidsetOrder(int order)voidsetRealmName(java.lang.String realmName)
 
- 
- 
- 
Method Detail- 
getOrderpublic int getOrder() - Specified by:
- getOrderin interface- org.springframework.core.Ordered
 
 - 
setOrderpublic void setOrder(int order) 
 - 
afterPropertiesSetpublic void afterPropertiesSet() - Specified by:
- afterPropertiesSetin interface- org.springframework.beans.factory.InitializingBean
 
 - 
commencepublic void commence(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AuthenticationException authException) throws java.io.IOExceptionDescription copied from interface:AuthenticationEntryPointCommences an authentication scheme.ExceptionTranslationFilterwill populate theHttpSessionattribute namedAbstractAuthenticationProcessingFilter.SPRING_SECURITY_SAVED_REQUEST_KEYwith the requested target URL before calling this method.Implementations should modify the headers on the ServletResponseas necessary to commence the authentication process.- Specified by:
- commencein interface- AuthenticationEntryPoint
- Parameters:
- request- that resulted in an- AuthenticationException
- response- so that the user agent can begin authentication
- authException- that caused the invocation
- Throws:
- java.io.IOException
 
 - 
getKeypublic java.lang.String getKey() 
 - 
getNonceValiditySecondspublic int getNonceValiditySeconds() 
 - 
getRealmNamepublic java.lang.String getRealmName() 
 - 
setKeypublic void setKey(java.lang.String key) 
 - 
setNonceValiditySecondspublic void setNonceValiditySeconds(int nonceValiditySeconds) 
 - 
setRealmNamepublic void setRealmName(java.lang.String realmName) 
 
- 
 
-