public class SpringPlainTextPasswordValidationCallbackHandler extends AbstractCallbackHandler implements org.springframework.beans.factory.InitializingBean
AuthenticationManager. Logic based
on Spring Security's BasicProcessingFilter.
This handler requires an Spring Security AuthenticationManager to operate. It can be set using the
authenticationManager property. An Spring Security UsernamePasswordAuthenticationToken is
created with the username as principal and password as credentials.
This class only handles PasswordValidationCallbacks that contain a
PlainTextPasswordRequest, and throws an UnsupportedCallbackException for others.
UsernamePasswordAuthenticationToken,
PasswordValidationCallback,
PasswordValidationCallback.PlainTextPasswordRequestlogger| Constructor and Description |
|---|
SpringPlainTextPasswordValidationCallbackHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected void |
handleInternal(Callback callback)
Handles
PasswordValidationCallbacks that contain a PlainTextPasswordRequest, and throws
an UnsupportedCallbackException for others. |
void |
setAuthenticationManager(org.springframework.security.authentication.AuthenticationManager authenticationManager)
Sets the Spring Security authentication manager.
|
void |
setIgnoreFailure(boolean ignoreFailure) |
handlepublic SpringPlainTextPasswordValidationCallbackHandler()
public void setAuthenticationManager(org.springframework.security.authentication.AuthenticationManager authenticationManager)
public void setIgnoreFailure(boolean ignoreFailure)
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionprotected void handleInternal(Callback callback) throws IOException, UnsupportedCallbackException
PasswordValidationCallbacks that contain a PlainTextPasswordRequest, and throws
an UnsupportedCallbackException for others.handleInternal in class AbstractCallbackHandlerUnsupportedCallbackException - when the callback is not supportedIOExceptionCopyright © 2020 Pivotal Software. All rights reserved.