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 PasswordValidationCallback
s that contain a
PlainTextPasswordRequest
, and throws an UnsupportedCallbackException
for others.
UsernamePasswordAuthenticationToken
,
PasswordValidationCallback
,
PasswordValidationCallback.PlainTextPasswordRequest
logger
Constructor and Description |
---|
SpringPlainTextPasswordValidationCallbackHandler() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected void |
handleInternal(Callback callback)
Handles
PasswordValidationCallback s 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) |
handle
public 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.InitializingBean
Exception
protected void handleInternal(Callback callback) throws IOException, UnsupportedCallbackException
PasswordValidationCallback
s that contain a PlainTextPasswordRequest
, and throws
an UnsupportedCallbackException
for others.handleInternal
in class AbstractCallbackHandler
UnsupportedCallbackException
- when the callback is not supportedIOException
Copyright © 2020 Pivotal Software. All rights reserved.