Package org.jboss.security.authorization

Examples of org.jboss.security.authorization.AuthorizationModule


/*     */     throws AuthorizationException
/*     */   {
/* 258 */     int length = this.modules.size();
/* 259 */     for (int i = 0; i < length; i++)
/*     */     {
/* 261 */       AuthorizationModule module = (AuthorizationModule)this.modules.get(i);
/* 262 */       boolean bool = module.abort();
/* 263 */       if (!bool)
/* 264 */         throw new AuthorizationException("abort on modules failed");
/*     */     }
/*     */   }
View Full Code Here


/*     */   }
/*     */
/*     */   private AuthorizationModule instantiateModule(String name, Map<String, Object> map)
/*     */     throws PrivilegedActionException
/*     */   {
/* 271 */     AuthorizationModule am = null;
/* 272 */     ClassLoader tcl = SecurityActions.getContextClassLoader();
/*     */     try
/*     */     {
/* 275 */       Class clazz = tcl.loadClass(name);
/* 276 */       am = (AuthorizationModule)clazz.newInstance();
/*     */     }
/*     */     catch (Exception e)
/*     */     {
/* 280 */       log.debug("Error instantiating AuthorizationModule:", e);
/*     */     }
/* 282 */     if (am == null) {
/* 283 */       throw new IllegalStateException("AuthorizationModule has not been instantiated");
/*     */     }
/* 285 */     am.initialize(this.authenticatedSubject, this.callbackHandler, this.sharedState, map);
/*     */
/* 287 */     return am;
/*     */   }
View Full Code Here

      int overallDecision = DENY;

      int length = super.modules.size();
      for (int i = 0; i < length; i++)
      {
         AuthorizationModule module = (AuthorizationModule) super.modules.get(i);
         ControlFlag flag = (ControlFlag) super.controlFlags.get(i);
         int decision = DENY;
         try
         {
            decision = module.authorize(resource);
         }
         catch (Exception ae)
         {
            decision = DENY;
            if (moduleException == null)
View Full Code Here

   private void invokeCommit() throws AuthorizationException
   {
      int length = super.modules.size();
      for (int i = 0; i < length; i++)
      {
         AuthorizationModule module = (AuthorizationModule) super.modules.get(i);
         boolean bool = module.commit();
         if (!bool)
            throw new AuthorizationException("commit on modules failed:" + module.getClass());
      }
   }
View Full Code Here

   private void invokeAbort() throws AuthorizationException
   {
      int length = super.modules.size();
      for (int i = 0; i < length; i++)
      {
         AuthorizationModule module = (AuthorizationModule) super.modules.get(i);
         boolean bool = module.abort();
         if (!bool)
            throw new AuthorizationException("abort on modules failed:" + module.getClass());
      }
   }
View Full Code Here

   }

   private AuthorizationModule instantiateModule(String name, Map<String, Object> map, RoleGroup subjectRoles)
         throws PrivilegedActionException
   {
      AuthorizationModule am = null;
      ClassLoader tcl = SecurityActions.getContextClassLoader();
      try
      {
         Class<?> clazz = tcl.loadClass(name);
         am = (AuthorizationModule) clazz.newInstance();
      }
      catch (Exception e)
      {
         if (trace)
            log.debug("Error instantiating AuthorizationModule:", e);
      }
      if (am == null)
         throw new IllegalStateException("AuthorizationModule has not " + "been instantiated");
      am.initialize(this.authenticatedSubject, this.callbackHandler, this.sharedState, map, subjectRoles);
      return am;
   }
View Full Code Here

   throws AuthorizationException
   {
      int length = modules.size();
      for(int i = 0; i < length; i++)
      {
         AuthorizationModule module = (AuthorizationModule)modules.get(i);
         ControlFlag flag = (ControlFlag)this.controlFlags.get(i);
         int decision = DENY;
         try
         {
            decision = module.authorize(resource);
         }
         catch(Exception ae)
         {
            decision = DENY;
            if(this.moduleException == null)
View Full Code Here

   throws AuthorizationException
   {
      int length = modules.size();
      for(int i = 0; i < length; i++)
      {
         AuthorizationModule module = (AuthorizationModule)modules.get(i);
         boolean bool = module.commit();
         if(!bool)
            throw new AuthorizationException("commit on modules failed");
      }
   }
View Full Code Here

   throws AuthorizationException
   {
      int length = modules.size();
      for(int i = 0; i < length; i++)
      {
         AuthorizationModule module = (AuthorizationModule)modules.get(i);
         boolean bool = module.abort();
         if(!bool)
            throw new AuthorizationException("abort on modules failed");
      }
   }
View Full Code Here

      }
   }
  
   private AuthorizationModule instantiateModule(String name, Map map) throws PrivilegedActionException
   {
      AuthorizationModule am = null;
      ClassLoader tcl = SecurityActions.getContextClassLoader();
      try
      {
         Class clazz = tcl.loadClass(name);
         am = (AuthorizationModule)clazz.newInstance();
      }
      catch ( Exception e)
      {
         log.debug("Error instantiating AuthorizationModule:",e);
      }
      if(am == null)
         throw new IllegalStateException("AuthorizationModule has not " +
               "been instantiated");
      am.initialize(this.authenticatedSubject, this.callbackHandler,
            this.sharedState,map);
      return am;
   }
View Full Code Here

TOP

Related Classes of org.jboss.security.authorization.AuthorizationModule

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.