/** * Initialize this <code>LoginModule</code> with the specified * configuration information. * * @param subject The <code>Subject</code> to be authenticated * @param callbackHandler A <code>CallbackHandler</code> for communicating * with the end user as necessary * @param sharedState State information shared with other * <code>LoginModule</code> instances * @param options Configuration information for this specific * <code>LoginModule</code> instance */ public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) { log.debug("Init"); // Save configuration values this.subject = subject; this.callbackHandler = callbackHandler; this.sharedState = sharedState; this.options = options; // Perform instance-specific initialization if (options.get("pathname") != null) this.pathname = (String) options.get("pathname"); // Load our defined Principals load(); }
/** * Phase 2 of authenticating a <code>Subject</code> when Phase 1 * fails. This method is called if the <code>LoginContext</code> * failed somewhere in the overall authentication chain. * * @return <code>true</code> if this method succeeded, or * <code>false</code> if this <code>LoginModule</code> should be * ignored * * @exception LoginException if the abort fails */ public boolean abort() throws LoginException { // If our authentication was not successful, just return false if (principal == null) return (false); // Clean up if overall authentication failed if (committed) logout(); else { committed = false; principal = null; } log.debug("Abort"); return (true); }
setCredentialHandler(credentialHandler); load();
String catalinaBase = getCatalinaBase(); if (catalinaBase == null) { log.warn("Unable to determine Catalina base to load file " + pathname);
file = new File(getContainer().getCatalinaBase(), pathname); if (!file.exists() || !file.canRead()) { log.warn("Cannot load configuration file " + file.getAbsolutePath());
setCredentialHandler(credentialHandler); load();
String catalinaBase = getCatalinaBase(); if (catalinaBase == null) { log.warn(sm.getString("jaasMemoryLoginModule.noCatalinaBase", pathname));
/** * Phase 2 of authenticating a <code>Subject</code> when Phase 1 * fails. This method is called if the <code>LoginContext</code> * failed somewhere in the overall authentication chain. * * @return <code>true</code> if this method succeeded, or * <code>false</code> if this <code>LoginModule</code> should be * ignored * * @exception LoginException if the abort fails */ @Override public boolean abort() throws LoginException { // If our authentication was not successful, just return false if (principal == null) return (false); // Clean up if overall authentication failed if (committed) logout(); else { committed = false; principal = null; } log.debug("Abort"); return (true); }
/** * Initialize this <code>LoginModule</code> with the specified * configuration information. * * @param subject The <code>Subject</code> to be authenticated * @param callbackHandler A <code>CallbackHandler</code> for communicating * with the end user as necessary * @param sharedState State information shared with other * <code>LoginModule</code> instances * @param options Configuration information for this specific * <code>LoginModule</code> instance */ @Override public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options) { log.debug("Init"); // Save configuration values this.subject = subject; this.callbackHandler = callbackHandler; this.sharedState = sharedState; this.options = options; // Perform instance-specific initialization if (options.get("pathname") != null) this.pathname = (String) options.get("pathname"); // Load our defined Principals load(); }
/** * Phase 2 of authenticating a <code>Subject</code> when Phase 1 * fails. This method is called if the <code>LoginContext</code> * failed somewhere in the overall authentication chain. * * @return <code>true</code> if this method succeeded, or * <code>false</code> if this <code>LoginModule</code> should be * ignored * * @exception LoginException if the abort fails */ @Override public boolean abort() throws LoginException { // If our authentication was not successful, just return false if (principal == null) return (false); // Clean up if overall authentication failed if (committed) logout(); else { committed = false; principal = null; } log.debug("Abort"); return (true); }
/** * Initialize this <code>LoginModule</code> with the specified * configuration information. * * @param subject The <code>Subject</code> to be authenticated * @param callbackHandler A <code>CallbackHandler</code> for communicating * with the end user as necessary * @param sharedState State information shared with other * <code>LoginModule</code> instances * @param options Configuration information for this specific * <code>LoginModule</code> instance */ @Override public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options) { log.debug("Init"); // Save configuration values this.subject = subject; this.callbackHandler = callbackHandler; this.sharedState = sharedState; this.options = options; // Perform instance-specific initialization if (options.get("pathname") != null) this.pathname = (String) options.get("pathname"); // Load our defined Principals load(); }
/** * Phase 2 of authenticating a <code>Subject</code> when Phase 1 * fails. This method is called if the <code>LoginContext</code> * failed somewhere in the overall authentication chain. * * @return <code>true</code> if this method succeeded, or * <code>false</code> if this <code>LoginModule</code> should be * ignored * * @exception LoginException if the abort fails */ @Override public boolean abort() throws LoginException { // If our authentication was not successful, just return false if (principal == null) return (false); // Clean up if overall authentication failed if (committed) logout(); else { committed = false; principal = null; } log.debug("Abort"); return (true); }
/** * Initialize this <code>LoginModule</code> with the specified * configuration information. * * @param subject The <code>Subject</code> to be authenticated * @param callbackHandler A <code>CallbackHandler</code> for communicating * with the end user as necessary * @param sharedState State information shared with other * <code>LoginModule</code> instances * @param options Configuration information for this specific * <code>LoginModule</code> instance */ @Override public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options) { log.debug("Init"); // Save configuration values this.subject = subject; this.callbackHandler = callbackHandler; this.sharedState = sharedState; this.options = options; // Perform instance-specific initialization if (options.get("pathname") != null) this.pathname = (String) options.get("pathname"); // Load our defined Principals load(); }
/** * Phase 2 of authenticating a <code>Subject</code> when Phase 1 * fails. This method is called if the <code>LoginContext</code> * failed somewhere in the overall authentication chain. * * @return <code>true</code> if this method succeeded, or * <code>false</code> if this <code>LoginModule</code> should be * ignored * * @exception LoginException if the abort fails */ @Override public boolean abort() throws LoginException { // If our authentication was not successful, just return false if (principal == null) return (false); // Clean up if overall authentication failed if (committed) logout(); else { committed = false; principal = null; } log.debug("Abort"); return (true); }
/** * Initialize this <code>LoginModule</code> with the specified * configuration information. * * @param subject The <code>Subject</code> to be authenticated * @param callbackHandler A <code>CallbackHandler</code> for communicating * with the end user as necessary * @param sharedState State information shared with other * <code>LoginModule</code> instances * @param options Configuration information for this specific * <code>LoginModule</code> instance */ @Override public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options) { log.debug("Init"); // Save configuration values this.subject = subject; this.callbackHandler = callbackHandler; this.sharedState = sharedState; this.options = options; // Perform instance-specific initialization if (options.get("pathname") != null) this.pathname = (String) options.get("pathname"); // Load our defined Principals load(); }
/** * Phase 2 of authenticating a <code>Subject</code> when Phase 1 * fails. This method is called if the <code>LoginContext</code> * failed somewhere in the overall authentication chain. * * @return <code>true</code> if this method succeeded, or * <code>false</code> if this <code>LoginModule</code> should be * ignored * * @exception LoginException if the abort fails */ @Override public boolean abort() throws LoginException { // If our authentication was not successful, just return false if (principal == null) return (false); // Clean up if overall authentication failed if (committed) logout(); else { committed = false; principal = null; } log.debug("Abort"); return (true); }
/** * Initialize this <code>LoginModule</code> with the specified * configuration information. * * @param subject The <code>Subject</code> to be authenticated * @param callbackHandler A <code>CallbackHandler</code> for communicating * with the end user as necessary * @param sharedState State information shared with other * <code>LoginModule</code> instances * @param options Configuration information for this specific * <code>LoginModule</code> instance */ @Override public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options) { log.debug("Init"); // Save configuration values this.subject = subject; this.callbackHandler = callbackHandler; this.sharedState = sharedState; this.options = options; // Perform instance-specific initialization if (options.get("pathname") != null) this.pathname = (String) options.get("pathname"); // Load our defined Principals load(); }
/** * Phase 2 of authenticating a <code>Subject</code> when Phase 1 * fails. This method is called if the <code>LoginContext</code> * failed somewhere in the overall authentication chain. * * @return <code>true</code> if this method succeeded, or * <code>false</code> if this <code>LoginModule</code> should be * ignored * * @exception LoginException if the abort fails */ @Override public boolean abort() throws LoginException { // If our authentication was not successful, just return false if (principal == null) return (false); // Clean up if overall authentication failed if (committed) logout(); else { committed = false; principal = null; } log.debug("Abort"); return (true); }
/** * Initialize this <code>LoginModule</code> with the specified * configuration information. * * @param subject The <code>Subject</code> to be authenticated * @param callbackHandler A <code>CallbackHandler</code> for communicating * with the end user as necessary * @param sharedState State information shared with other * <code>LoginModule</code> instances * @param options Configuration information for this specific * <code>LoginModule</code> instance */ @Override public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options) { log.debug("Init"); // Save configuration values this.subject = subject; this.callbackHandler = callbackHandler; this.sharedState = sharedState; this.options = options; // Perform instance-specific initialization if (options.get("pathname") != null) this.pathname = (String) options.get("pathname"); // Load our defined Principals load(); }
/** * Phase 2 of authenticating a <code>Subject</code> when Phase 1 * fails. This method is called if the <code>LoginContext</code> * failed somewhere in the overall authentication chain. * * @return <code>true</code> if this method succeeded, or * <code>false</code> if this <code>LoginModule</code> should be * ignored * * @exception LoginException if the abort fails */ @Override public boolean abort() throws LoginException { // If our authentication was not successful, just return false if (principal == null) { return false; } // Clean up if overall authentication failed if (committed) { logout(); } else { committed = false; principal = null; } if (log.isDebugEnabled()) { log.debug("Abort"); } return true; }