jaas/src/main/java/com/yubico/jaas/YubikeyLoginModule.java
public boolean login() throws LoginException {
		NameCallback nameCb = new NameCallback("Enter username: ");

		log.debug("Begin OTP login");

		if (callbackHandler == null) {
			throw new LoginException("No callback handler available in login()");
		}

		List<String> otps = get_tokens(nameCb);
		if (otps.size() == 0) {
			if (this.soft_fail_on_no_otps) {

				log.debug("No OTPs found, and soft-fail is on. Making JAAS ignore this module.");
				return false;
			}
			throw new LoginException("YubiKey OTP authentication failed - no OTPs supplied");
		}

		if (validate_otps(otps, nameCb)) {
			return true;
		}

		log.info("None out of {} possible YubiKey OTPs for user {} validated successful",
					otps.size(), nameCb.getName());

		throw new LoginException("YubiKey OTP authentication failed");
	}
public boolean login() throws LoginException {
		NameCallback nameCb = new NameCallback("Enter username: ");

		log.debug("Begin OTP login");

		if (callbackHandler == null) {
			throw new LoginException("No callback handler available in login()");
		}

		List<String> otps = get_tokens(nameCb);
		if (otps.size() == 0) {
			if (this.soft_fail_on_no_otps) {

				log.debug("No OTPs found, and soft-fail is on. Making JAAS ignore this module.");
				return false;
			}
			throw new LoginException("YubiKey OTP authentication failed - no OTPs supplied");
		}

		if (validate_otps(otps, nameCb)) {
			return true;
		}

		log.info("None out of {} possible YubiKey OTPs for user {} validated successful",
					otps.size(), nameCb.getName());

		throw new LoginException("YubiKey OTP authentication failed");
	}
/* (non-Javadoc)
@see javax.security.auth.spi.LoginModule#login()