Package org.apache.shiro.authz.annotation

Examples of org.apache.shiro.authz.annotation.RequiresGuest


    boolean requiresGuest = false;

    try
    {
      RequiresGuest annotation = runtimeClass.getAnnotation(RequiresGuest.class);
      requiresGuest = (annotation != null);
    }
    catch (NullPointerException e)
    {
      requiresGuest = false;
    }

    if (requiresGuest && !ApplicationSecurity.isGuest())
    {
      final String message = String.format("Guest role is required for %s on %s", userName, viewName);
      logger.warn(message);
      throw new AuthenticationException(message);
    }

    try
    {
      RequiresGuest annotation = method.getAnnotation(RequiresGuest.class);
      requiresGuest = (annotation != null);
    }
    catch (NullPointerException e)
    {
      requiresGuest = false;
View Full Code Here

TOP

Related Classes of org.apache.shiro.authz.annotation.RequiresGuest

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.