Package org.jboss.seam.security

Examples of org.jboss.seam.security.SecurityDefinitionException


                  }
               }
              
               if (!found)
               {
                  event.addDefinitionError(new SecurityDefinitionException("Secured type " +
                        type.getJavaClass().getName() +
                        " has no matching authorizer method for security binding @" +
                        annotation.annotationType().getName()));
               }
            }
View Full Code Here


                           sb.append(a.getImplementationMethod().getName());
                           sb.append("]");                             
                        }
                     }
                    
                     throw new SecurityDefinitionException(
                           "Ambiguous authorizers found for security binding type [@" +
                           binding.annotationType().getName() + "] on method [" +
                           method.getDeclaringClass().getName() + "." +
                           method.getName() + "]. " + sb.toString());
                  }
                 
                  authorizerStack.add(authorizer);
                  found = true;
               }             
            }
           
            if (!found)
            {
               throw new SecurityDefinitionException(
                     "No matching authorizer found for security binding type [@" +
                     binding.annotationType().getName() + "] on method [" +
                     method.getDeclaringClass().getName() + "." +
                     method.getName() + "].");
            }
View Full Code Here

   protected void registerAuthorizer(AnnotatedMethod<?> m)
   {
      if (!m.getJavaMember().getReturnType().equals(Boolean.class) &&
          !m.getJavaMember().getReturnType().equals(Boolean.TYPE))
      {
         throw new SecurityDefinitionException("Invalid authorizer method [" +
               m.getJavaMember().getDeclaringClass().getName() + "." +
               m.getJavaMember().getName() + "] - does not return a boolean.");
      }
     
      // Locate the binding type
      Annotation binding = null;
     
      for (Annotation a : m.getAnnotations())
      {
         if (a.annotationType().isAnnotationPresent(SecurityBindingType.class))
         {
            if  (binding != null)
            {
               throw new SecurityDefinitionException("Invalid authorizer method [" +
                     m.getJavaMember().getDeclaringClass().getName() + "." +
                     m.getJavaMember().getName() + "] - declares multiple security binding types");
            }
            binding = a;
         }
View Full Code Here

               memberValues.put(m, m.invoke(binding));
            }
         }
         catch (InvocationTargetException ex)
         {
            throw new SecurityDefinitionException("Error reading security binding members", ex);
         }
         catch (IllegalAccessException ex)
         {
            throw new SecurityDefinitionException("Error reading security binding members", ex);
         }
      }
View Full Code Here

                  return false;
               }
            }
            catch (InvocationTargetException ex)
            {
               throw new SecurityDefinitionException("Error reading security binding members", ex);
            }
            catch (IllegalAccessException ex)
            {
               throw new SecurityDefinitionException("Error reading security binding members", ex);
            }
         }
        
         return true;
      }
View Full Code Here

TOP

Related Classes of org.jboss.seam.security.SecurityDefinitionException

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.