protected boolean loggedIntoValidRealm(String requestedRealm,String loggedInRealm){
  return requestedRealm.equalsIgnoreCase(loggedInRealm) || RealmUtils.isParentRealm(loggedInRealm,requestedRealm);
}

protected boolean loggedIntoValidRealm ( String requestedRealm , String loggedInRealm ) { return requestedRealm . equalsIgnoreCase ( loggedInRealm ) || RealmUtils . isParentRealm ( loggedInRealm , requestedRealm ) ; }
check to see if the realm logged into is valid for getting access to the realm requested .
