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;
}