public void execute( NextCommand next, IoSession session, Object message ) throws Exception
{
ChangePasswordContext changepwContext = ( ChangePasswordContext ) session.getAttribute( getContextKey() );
ChangePasswordServer config = changepwContext.getConfig();
Authenticator authenticator = changepwContext.getAuthenticator();
KerberosPrincipal clientPrincipal = KerberosUtils.getKerberosPrincipal(
authenticator.getCName(), authenticator.getCRealm() );
String password = changepwContext.getPassword();
String username = clientPrincipal.getName();
int passwordLength = config.getPasswordLengthPolicy();
int categoryCount = config.getCategoryCountPolicy();
int tokenSize = config.getTokenSizePolicy();
if ( !isValid( username, password, passwordLength, categoryCount, tokenSize ) )
{
String explanation = buildErrorMessage( username, password, passwordLength, categoryCount, tokenSize );
log.error( explanation );