congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
JAASMemoryLoginModule
Code IndexAdd Tabnine to your IDE (free)

How to use
JAASMemoryLoginModule
in
org.apache.catalina.realm

Best Java code snippets using org.apache.catalina.realm.JAASMemoryLoginModule (Showing top 20 results out of 315)

origin: tomcat/catalina-optional

/**
 * 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();
}
origin: tomcat/catalina-optional

/**
 * 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);
}
origin: org.apache.tomcat/tomcat-catalina

setCredentialHandler(credentialHandler);
load();
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

String catalinaBase = getCatalinaBase();
if (catalinaBase == null) {
  log.warn("Unable to determine Catalina base to load file " + pathname);
origin: codefollower/Tomcat-Research

  file = new File(getContainer().getCatalinaBase(), pathname);
if (!file.exists() || !file.canRead()) {
  log.warn("Cannot load configuration file " + file.getAbsolutePath());
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

setCredentialHandler(credentialHandler);
load();
origin: org.apache.tomcat/tomcat-catalina

String catalinaBase = getCatalinaBase();
if (catalinaBase == null) {
  log.warn(sm.getString("jaasMemoryLoginModule.noCatalinaBase", pathname));
origin: codefollower/Tomcat-Research

/**
 * 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);
}
origin: org.apache.catalina/com.springsource.org.apache.catalina

/**
 * 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();
}
origin: org.apache.catalina/com.springsource.org.apache.catalina

/**
 * 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);
}
origin: org.apache.geronimo.ext.tomcat/catalina

/**
 * 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();
}
origin: com.ovea.tajin.servers/tajin-server-jetty9

/**
 * 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);
}
origin: com.ovea.tajin.server/tajin-server-jetty9

/**
 * 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();
}
origin: org.apache.geronimo.ext.tomcat/catalina

/**
 * 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);
}
origin: codefollower/Tomcat-Research

/**
 * 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();
}
origin: com.ovea.tajin.server/tajin-server-jetty9

/**
 * 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);
}
origin: com.ovea.tajin.servers/tajin-server-jetty9

/**
 * 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();
}
origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * 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);
}
origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * 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();
}
origin: org.apache.tomcat/tomcat-catalina

/**
 * 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;
}
org.apache.catalina.realmJAASMemoryLoginModule

Javadoc

Implementation of the JAAS LoginModule interface, primarily for use in testing JAASRealm. It utilizes an XML-format data file of username/password/role information identical to that supported by org.apache.catalina.realm.MemoryRealm (except that digested passwords are not supported).

This class recognizes the following string-valued options, which are specified in the configuration file (and passed to our constructor in the options argument:

  • debug - Set to "true" to get debugging messages generated to System.out. The default value is false.
  • pathname - Relative (to the pathname specified by the "catalina.base" system property) or absolute pathname to the XML file containing our user information, in the format supported by MemoryRealm. The default value matches the MemoryRealm default.

IMPLEMENTATION NOTE - This class implements Realm only to satisfy the calling requirements of the GenericPrincipal constructor. It does not actually perform the functionality required of a Realm implementation.

Most used methods

  • load
    Load the contents of our configuration file.
  • logout
    Log out this user.
  • getCatalinaBase
  • setCredentialHandler
  • getContainer

Popular in Java

  • Making http post requests using okhttp
  • runOnUiThread (Activity)
  • startActivity (Activity)
  • setRequestProperty (URLConnection)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now