opt/tomcat/tomcat-4/src/main/java/flex/messaging/security/TomcatValve4150.java [187:212]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                        session.setPrincipal(principal);
                        if (username != null)
                            session.setNote(Constants.SESS_USERNAME_NOTE, username);
                        else
                            session.removeNote(Constants.SESS_USERNAME_NOTE);
                        if (password != null)
                            session.setNote(Constants.SESS_PASSWORD_NOTE, password);
                        else
                            session.removeNote(Constants.SESS_PASSWORD_NOTE);
                    }
                }
            }

            return principal;
        }

        public boolean authorize(Principal principal, List roles) {

            Realm realm = container.getRealm();
            Iterator iter = roles.iterator();
            while (iter.hasNext()) {
                String role = (String) iter.next();
                if (realm.hasRole(principal, role))
                    return true;
            }
            return false;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



opt/tomcat/tomcat-6/src/main/java/flex/messaging/security/TomcatValve.java [192:217]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                    session.setPrincipal(principal);

                    if (username != null)
                        session.setNote(Constants.SESS_USERNAME_NOTE, username);
                    else
                        session.removeNote(Constants.SESS_USERNAME_NOTE);

                    if (password != null)
                        session.setNote(Constants.SESS_PASSWORD_NOTE, password);
                    else
                        session.removeNote(Constants.SESS_PASSWORD_NOTE);
                }
            }

            return principal;
        }

        public boolean authorize(Principal principal, List roles) {
            Realm realm = container.getRealm();
            Iterator iter = roles.iterator();
            while (iter.hasNext()) {
                String role = (String) iter.next();
                if (realm.hasRole(principal, role))
                    return true;
            }
            return false;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



