/** This is the place where the iteration for the {@link AuthRealm} for administration should be carried out * in server. A convenience method for the same. * * @param as AdminService implemented by those who implement the interface (outer interface). * @return AuthRealm instance for which the name is same as as.getAuthRealmName(), null otherwise. */ public static AuthRealm getAssociatedAuthRealm(AdminService as) { String rn = as.getAuthRealmName(); //this is the name of admin-service@auth-realm-name Config cfg = as.getParent(Config.class); //assumes the structure where <admin-service> resides directly under <config> SecurityService ss = cfg.getSecurityService(); List<AuthRealm> realms = ss.getAuthRealm(); for (AuthRealm realm : realms) { if (rn.equals(realm.getName())) return realm; } return null; }
if (realm == null) { throw new RuntimeException("Warning: Configuration is bad, realm: " + as.getAuthRealmName() + " does not exist!");
/** This is the place where the iteration for the {@link AuthRealm} for administration should be carried out * in server. A convenience method for the same. * * @param as AdminService implemented by those who implement the interface (outer interface). * @return AuthRealm instance for which the name is same as as.getAuthRealmName(), null otherwise. */ public static AuthRealm getAssociatedAuthRealm(AdminService as) { String rn = as.getAuthRealmName(); //this is the name of admin-service@auth-realm-name Config cfg = as.getParent(Config.class); //assumes the structure where <admin-service> resides directly under <config> SecurityService ss = cfg.getSecurityService(); List<AuthRealm> realms = ss.getAuthRealm(); for (AuthRealm realm : realms) { if (rn.equals(realm.getName())) return realm; } return null; }
if (authRealm.getName().equals(adminService.getAuthRealmName())) { fileAuthRealm = authRealm; break;
&& (authRealmName.equals(adminService.getAuthRealmName()))) { if (password.isEmpty()) { report.setMessage(localStrings.getLocalString(
secureAdmin = domain.getSecureAdmin(); if ((SecureAdmin.Util.isEnabled(secureAdmin)) && (adminService.getAuthRealmName().equals(authRealmName))) { if ((password.isEmpty())) { report.setMessage(localStrings.getLocalString(