Package org.apache.tomcat

Examples of org.apache.tomcat.Realm


     *
     * @param realm The newly associated Realm
     */
    public void setRealm(Realm realm) {

  Realm oldRealm = this.realm;
  this.realm = realm;
  if (this.realm != null)
      this.realm.setContainer(this);
  support.firePropertyChange("realm", oldRealm, this.realm);

View Full Code Here


     sm.getString("securityValve.missingMethod"));
      return (false);
  }

  // Check each role included in this constraint
  Realm realm = context.getRealm();
  String roles[] = constraint.findAuthRoles();
  if (roles == null)
      roles = new String[0];
  if (roles.length == 0)
      return (true)// Authenticated user is sufficient
  for (int i = 0; i < roles.length; i++) {
      if (realm.hasRole(principal, roles[i]))
    return (true);
  }

  // Return a "Forbidden" message denying access to this resource
  response.getResponse().sendError
View Full Code Here

TOP

Related Classes of org.apache.tomcat.Realm

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.