class JaasPlainTextPasswordValidationCallbackHandler extends AbstractJaasValidationCallbackHandler {

	@Override
	protected final void handleInternal(Callback callback) throws UnsupportedCallbackException {
		if (callback instanceof PasswordValidationCallback) {
			PasswordValidationCallback validationCallback = (PasswordValidationCallback) callback;
			if (validationCallback.getRequest() instanceof PasswordValidationCallback.PlainTextPasswordRequest) {
				validationCallback.setValidator(new JaasPlainTextPasswordValidator());
				return;
			}
		}
		throw new UnsupportedCallbackException(callback);
	}

}