Package org.apache.geronimo.jee.loginconfig

Examples of org.apache.geronimo.jee.loginconfig.Option


  if (realmType.equals("Properties File Realm")) {
      loginModule
        .setLoginModuleClass("org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule");

      String usersfile = page1.textEntries[0].getText().trim();
      Option usersfileopt = createOption("usersURI", usersfile);

      String groupsfile = page1.textEntries[1].getText().trim();
      Option groupsfileopt = createOption("groupsURI", groupsfile);

      String algorithm = page1.textEntries[2].getText();
      Option algorithmopt = createOption("digest", algorithm);

      String encoding = page1.textEntries[3].getText();
      Option encodingopt = createOption("encoding", encoding);

      loginModule.getOption().add(usersfileopt);
      loginModule.getOption().add(groupsfileopt);
      if (algorithm != null)
    loginModule.getOption().add(algorithmopt);
      if (encoding != null)
    loginModule.getOption().add(encodingopt);

  } else if (realmType.equals("SQL Realm")) {
      loginModule
        .setLoginModuleClass("org.apache.geronimo.security.realm.providers.SQLLoginModule");

      String selectUsers = page2.textEntries[0].getText().trim();
      Option selectUsersopt = createOption("userSelect", selectUsers);

      String selectGroups = page2.textEntries[1].getText().trim();
      Option selectGroupsopt = createOption("groupSelect", selectGroups);

      String algorithm = page2.textEntries[2].getText().trim();
      Option algorithmopt = createOption("digest", algorithm);

      String encoding = page2.textEntries[3].getText().trim();
      Option encodingopt = createOption("encoding", encoding);

      if (page3.buttons[0].getSelection()) {
    String dsname = page3.dataBasePoolCombo.getText();
    Option dsnameopt = createOption("dataSourceName", dsname);
    loginModule.getOption().add(dsnameopt);
      } else if (page3.buttons[1].getSelection()) {

    String jdbcDriverClass = page3.textEntries[0].getText().trim();
    Option jdbcDriverClassopt = createOption("jdbcDriver",
      jdbcDriverClass);

    String jdbcURL = page3.textEntries[1].getText().trim();
    Option jdbcURLopt = createOption("jdbcURL", jdbcURL);

    String userName = page3.textEntries[2].getText().trim();
    Option userNameopt = createOption("jdbcUser", userName);

    String password = page3.textEntries[3].getText().trim();
    Option passwordopt = createOption("jdbcPassword", password);

    loginModule.getOption().add(jdbcDriverClassopt);
    loginModule.getOption().add(jdbcURLopt);
    loginModule.getOption().add(userNameopt);
    loginModule.getOption().add(passwordopt);
View Full Code Here


      dependencies.getDependency().add(securityDependency);
  }
    }

    private Option createOption(String name, String value) {
  Option option = new Option();
  option.setName(name);
  option.setValue(value);
  return option;
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.jee.loginconfig.Option

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.