Class DigestAuthenticationEntryPoint
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean,org.springframework.core.Ordered,AuthenticationEntryPoint
SecurityEnforcementFilter to commence authentication via the
DigestAuthenticationFilter.
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 the
stale=true header 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).
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcommence(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthenticationException authException) Commences an authentication scheme.getKey()intintgetOrder()voidvoidsetNonceValiditySeconds(int nonceValiditySeconds) voidsetOrder(int order) voidsetRealmName(String realmName)
-
Constructor Details
-
DigestAuthenticationEntryPoint
public DigestAuthenticationEntryPoint()
-
-
Method Details
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
setOrder
public void setOrder(int order) -
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
commence
public void commence(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthenticationException authException) throws IOException Description 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 interfaceAuthenticationEntryPoint- Parameters:
request- that resulted in anAuthenticationExceptionresponse- so that the user agent can begin authenticationauthException- that caused the invocation- Throws:
IOException
-
getKey
-
getNonceValiditySeconds
public int getNonceValiditySeconds() -
getRealmName
-
setKey
-
setNonceValiditySeconds
public void setNonceValiditySeconds(int nonceValiditySeconds) -
setRealmName
-