jaas/src/main/java/com/yubico/jaas/HttpOathOtpLoginModule.java
public boolean login() throws LoginException {
		log.trace("Begin OATH OTP login");

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

		NameCallback nameCb = new NameCallback("Enter username: ");

		List<String> otps = get_tokens(nameCb);

		for (String otp : otps) {
			String userName = nameCb.getName();

			log.trace("Checking OATH OTP for user {}", userName);

			if (verify_otp(userName, otp)) {
				log.info("OATH OTP verified successfully");
				principal = new YubikeyPrincipal(userName, this.idRealm);
				return true;
			}
			log.info("OATH OTP did NOT verify");
		}
		throw new LoginException("OATH OTP verification failed");
	}
public boolean login() throws LoginException {
		log.trace("Begin OATH OTP login");

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

		NameCallback nameCb = new NameCallback("Enter username: ");

		List<String> otps = get_tokens(nameCb);

		for (String otp : otps) {
			String userName = nameCb.getName();

			log.trace("Checking OATH OTP for user {}", userName);

			if (verify_otp(userName, otp)) {
				log.info("OATH OTP verified successfully");
				principal = new YubikeyPrincipal(userName, this.idRealm);
				return true;
			}
			log.info("OATH OTP did NOT verify");
		}
		throw new LoginException("OATH OTP verification failed");
	}
/* (non-Javadoc)
@see javax.security.auth.spi.LoginModule#login()