public class SpringDigestPasswordValidationCallbackHandler extends AbstractCallbackHandler implements org.springframework.beans.factory.InitializingBean
UserDetailsService
. Logic
based on Spring Security's DigestProcessingFilter
.
An Spring Security UserDetailService
is used to load UserDetails
from. The digest of the
password contained in this details object is then compared with the digest in the message.
This class only handles PasswordValidationCallback
s that contain a DigestPasswordRequest
,
and throws an UnsupportedCallbackException
for others.
UserDetailsService
,
PasswordValidationCallback
,
PasswordValidationCallback.DigestPasswordRequest
logger
Constructor and Description |
---|
SpringDigestPasswordValidationCallbackHandler() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected void |
handleInternal(Callback callback)
Handles
PasswordValidationCallback s that contain a DigestPasswordRequest , and throws an
UnsupportedCallbackException for others |
void |
setUserCache(org.springframework.security.core.userdetails.UserCache userCache)
Sets the users cache.
|
void |
setUserDetailsService(org.springframework.security.core.userdetails.UserDetailsService userDetailsService)
Sets the Spring Security user details service.
|
handle
public SpringDigestPasswordValidationCallbackHandler()
public void setUserCache(org.springframework.security.core.userdetails.UserCache userCache)
public void setUserDetailsService(org.springframework.security.core.userdetails.UserDetailsService userDetailsService)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
protected void handleInternal(Callback callback) throws IOException, UnsupportedCallbackException
PasswordValidationCallback
s that contain a DigestPasswordRequest
, and throws an
UnsupportedCallbackException
for othershandleInternal
in class AbstractCallbackHandler
UnsupportedCallbackException
- when the callback is not supportedIOException
Copyright © 2020 Pivotal Software. All rights reserved.