jaas/src/main/java/com/yubico/jaas/HttpOathOtpLoginModule.java
public void initialize(Subject newSubject, CallbackHandler newCallbackHandler,
			Map<String, ?> sharedState, Map<String, ?> options) {

		log.trace("Initializing HTTP OATH OTP LoginModule");

		this.subject = newSubject;
		this.callbackHandler = newCallbackHandler;

		this.protectedUrl = options.get(OPTION_HTTPOATHOTP_PROTECTED_URL).toString();

		if (options.get(OPTION_HTTPOATHOTP_EXPECTED_OUTPUT) != null) {
			this.expectedOutput = options.get(OPTION_HTTPOATHOTP_EXPECTED_OUTPUT).toString();
		}

		if (options.get(OPTION_HTTPOATHOTP_MIN_LENGTH) != null) {
			this.minLength = Integer.parseInt(options.get(OPTION_HTTPOATHOTP_MIN_LENGTH).toString());
		}
		if (options.get(OPTION_HTTPOATHOTP_MAX_LENGTH) != null) {
			this.maxLength = Integer.parseInt(options.get(OPTION_HTTPOATHOTP_MAX_LENGTH).toString());
		}
		if (options.get(OPTION_HTTPOATHOTP_REQUIRE_ALL_DIGITS) != null) {
			String s = options.get(OPTION_HTTPOATHOTP_REQUIRE_ALL_DIGITS).toString();
			if (s.equals("true")) {
				this.requireAllDigits = true;
			} else if (s.equals("false")) {
				this.requireAllDigits = false;
			} else {
				log.error("Bad value for option {}", OPTION_HTTPOATHOTP_REQUIRE_ALL_DIGITS);
			}
		}
		/* Realm of principals added after authentication */
		if (options.get(OPTION_HTTPOATHOTP_ID_REALM) != null) {
			this.idRealm = options.get(OPTION_HTTPOATHOTP_ID_REALM).toString();
		}
	}
public void initialize(Subject newSubject, CallbackHandler newCallbackHandler,
			Map<String, ?> sharedState, Map<String, ?> options) {

		log.trace("Initializing HTTP OATH OTP LoginModule");

		this.subject = newSubject;
		this.callbackHandler = newCallbackHandler;

		this.protectedUrl = options.get(OPTION_HTTPOATHOTP_PROTECTED_URL).toString();

		if (options.get(OPTION_HTTPOATHOTP_EXPECTED_OUTPUT) != null) {
			this.expectedOutput = options.get(OPTION_HTTPOATHOTP_EXPECTED_OUTPUT).toString();
		}

		if (options.get(OPTION_HTTPOATHOTP_MIN_LENGTH) != null) {
			this.minLength = Integer.parseInt(options.get(OPTION_HTTPOATHOTP_MIN_LENGTH).toString());
		}
		if (options.get(OPTION_HTTPOATHOTP_MAX_LENGTH) != null) {
			this.maxLength = Integer.parseInt(options.get(OPTION_HTTPOATHOTP_MAX_LENGTH).toString());
		}
		if (options.get(OPTION_HTTPOATHOTP_REQUIRE_ALL_DIGITS) != null) {
			String s = options.get(OPTION_HTTPOATHOTP_REQUIRE_ALL_DIGITS).toString();
			if (s.equals("true")) {
				this.requireAllDigits = true;
			} else if (s.equals("false")) {
				this.requireAllDigits = false;
			} else {
				log.error("Bad value for option {}", OPTION_HTTPOATHOTP_REQUIRE_ALL_DIGITS);
			}
		}
		/* Realm of principals added after authentication */
		if (options.get(OPTION_HTTPOATHOTP_ID_REALM) != null) {
			this.idRealm = options.get(OPTION_HTTPOATHOTP_ID_REALM).toString();
		}
	}
/* (non-Javadoc)
@see javax.security.auth.spi.LoginModule#initialize(javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler, java.util.Map, java.util.Map)