private List<String> get_tokens(NameCallback nameCb) throws LoginException {
		MultiValuePasswordCallback mv_passCb = new MultiValuePasswordCallback("Enter authentication tokens: ", false);
		List<String> result = new ArrayList<String>();

		try {
			/* Fetch a password using the callbackHandler */
			callbackHandler.handle(new Callback[] { nameCb, mv_passCb });

			for (char[] c : mv_passCb.getSecrets()) {
				String s = new String(c);
				/* Check that OTP looks like OATH before we verify it. User might have entered
				 * some other password instead of an OTP, and we don't want to send that, possibly
				 * in clear text, over the network.
				 */
				if (s.length() < this.minLength) {
					log.info("Skipping token, not a valid OATH OTP token (too short, {} < {})", s.length(), this.minLength);
				} else if (s.length() > this.maxLength) {
					log.info("Skipping token, not a valid OATH OTP token (too long, {} > {})", s.length(), this.maxLength);
				} else {
					if (this.requireAllDigits) {
						if (s.matches("^[0-9]+$")) {
							result.add(s);
						} else {
							log.info("Skipping token, not a valid OATH OTP token (non-digits not allowed)");
						}
					} else {
						result.add(s);
					}
				}
			}
		} catch (UnsupportedCallbackException ex) {
			log.error("Callback type not supported", ex);
		} catch (IOException ex) {
			log.error("CallbackHandler failed", ex);
		}

		return result;
	}