Package de.iritgo.aktera.authorization

Examples of de.iritgo.aktera.authorization.AuthorizationManager


      uiRequest.setUserEnvironment(userEnvironment);

      UIController controller = (UIController) KeelContainer.defaultContainer().getSpringBean(controllerId);

      AuthorizationManager authorizationManager = (AuthorizationManager) KeelContainer.defaultContainer()
              .getSpringBean(AuthorizationManager.ID);

      if (! authorizationManager.allowed(controller, controllerId, userEnvironment))
      {
        throw new SecurityException("Controller '" + controllerId + "' not authorized");
      }

      BeanResponse uiResponse = new BeanResponse();
View Full Code Here


  public static void execute(UIRequest request, UIResponse response)
    throws AuthorizationException, UIControllerException
  {
    UIController controller = (UIController) KeelContainer.defaultContainer().getSpringBean(request.getBean());

    AuthorizationManager authorizationManager = (AuthorizationManager) KeelContainer.defaultContainer()
            .getSpringBean(AuthorizationManager.ID);

    if (! authorizationManager.allowed(controller, request.getBean(), request.getUserEnvironment()))
    {
      throw new SecurityException("Controller '" + request.getBean() + "' not authorized");
    }

    controller.execute(request, response);
View Full Code Here

        throw new Exception(e);
      }

      // Lookup the Authorization Manager from the Service Manager
      String serviceKey = AuthorizationManager.ROLE + "/" + amHint;
      AuthorizationManager myAuthMgr = null;

      try
      {
        myAuthMgr = (AuthorizationManager) m_servicemanager.lookup(serviceKey);
      }
View Full Code Here

   */
  public void redirect(String bean, UIRequest request, UIResponse response) throws UIControllerException
  {
    UIController controller = (UIController) KeelContainer.defaultContainer().getSpringBean(bean);

    AuthorizationManager authorizationManager = (AuthorizationManager) KeelContainer.defaultContainer()
            .getSpringBean(AuthorizationManager.ID);

    try
    {
      if (! authorizationManager.allowed(controller, bean, request.getUserEnvironment()))
      {
        throw new SecurityException("Controller '" + bean + "' not authorized");
      }
    }
    catch (AuthorizationException x)
View Full Code Here

      SuperString.assertNotBlank(domain, "Must specify domain");
      SuperString.assertNotBlank(loginName, "Must specify login name");

      Persistent myUser = null;

      AuthorizationManager bypassAm = null;

      try
      {
        String bypassAmName = config.getChild("bypass-am").getValue("*");

 
View Full Code Here

    try
    {
      DefaultPersistentFactory dpf = getFactory();
      Context c = null;
      AuthorizationManager am = myAuthManager;

      if (myBypassAuthManager != null)
      {
        am = myBypassAuthManager;
      }
      else
      {
        c = dpf.getKeelContext();

        if (c == null)
        {
          throw new SecurityException(
                  "No context available and no bypass auth manager specified - unable to access secure persistent object "
                          + getInstanceIdentifier());
        }
      }

      if (am == null)
      {
        String msg = "Authmanager was not set for " + getName() + ", unable to verify authorization";

        log.error(msg);
        throw new SecurityException(msg);
      }

      return am.allowed(o, c);
    }
    catch (PersistenceException pe)
    {
      log.error("DB Error, unable to verify authorization", pe);
      throw new SecurityException("DB error, unable to verify authorization");
View Full Code Here

      }
    }

    if (o instanceof Securable)
    {
      AuthorizationManager am = ((Securable) o).getAuthorizationManager();

      if (am == null)
      {
        throw new ServiceException(role,
                "Authorization Manager was not setup properly, this is a container setup problem");
      }

      try
      {
        if (! am.allowed(o, c))
        {
          throw new SecurityException("Service '" + role + "' Not Authorized");
        }
      }
      catch (AuthorizationException e)
View Full Code Here

TOP

Related Classes of de.iritgo.aktera.authorization.AuthorizationManager

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.