Example #1
0
 /**
  * Returns the authentication service or chain configured for the given organization.
  *
  * @param orgDN organization DN.
  * @return the authentication service or chain configured for the given organization.
  */
 public String getOrgConfiguredAuthenticationChain(String orgDN) {
   String orgAuthConfig = null;
   try {
     OrganizationConfigManager orgConfigMgr = getOrgConfigManager(orgDN);
     ServiceConfig svcConfig = orgConfigMgr.getServiceConfig(ISAuthConstants.AUTH_SERVICE_NAME);
     Map attrs = svcConfig.getAttributes();
     orgAuthConfig = Misc.getMapAttr(attrs, ISAuthConstants.AUTHCONFIG_ORG);
   } catch (Exception e) {
     debug.error("Error in getOrgConfiguredAuthenticationChain : ", e);
   }
   return orgAuthConfig;
 }
Example #2
0
 /**
  * Default Constructor
  *
  * @param realm in which emails service shall be created
  */
 public MailServerImpl(String realm) {
   debug = Debug.getInstance("amMailServer");
   sendMail = new AMSendMail();
   try {
     mgr =
         new ServiceConfigManager(
             (SSOToken) AccessController.doPrivileged(AdminTokenAction.getInstance()),
             SERVICE_NAME,
             SERVICE_VERSION);
     scm = mgr.getOrganizationConfig(realm, null);
     options = scm.getAttributes();
   } catch (Exception e) {
     debug.error("Cannot get ServiceConfigManager", e);
   }
 }
Example #3
0
 /**
  * Returns a list of domains defined by iplanet-am-auth-valid-goto-domains in iPlanetAMAuthService
  * plus organization aliases
  *
  * @param orgDN organization DN.
  * @return a Set object containing a list of valid domains, null if
  *     iplanet-am-auth-valid-goto-domains is empty.
  */
 private Set getValidGotoUrlDomains(String orgDN) {
   Set validGotoUrlDomains = null;
   try {
     OrganizationConfigManager orgConfigMgr = getOrgConfigManager(orgDN);
     ServiceConfig svcConfig = orgConfigMgr.getServiceConfig(ISAuthConstants.AUTH_SERVICE_NAME);
     Map attrs = svcConfig.getAttributes();
     validGotoUrlDomains = (Set) attrs.get(ISAuthConstants.AUTH_GOTO_DOMAINS);
     if (debug.messageEnabled()) {
       debug.message("AuthD.getValidGotoUrlDomains(): " + validGotoUrlDomains);
     }
   } catch (Exception e) {
     debug.error("AuthD.getValidGotoUrlDomains():" + "Error in getValidGotoUrlDomains : ", e);
   }
   return validGotoUrlDomains;
 }