org.apache.shiro.authz.annotation.RequiresGuest Java Examples
The following examples show how to use
org.apache.shiro.authz.annotation.RequiresGuest.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TestShiroAnnotations.java From aries-jax-rs-whiteboard with Apache License 2.0 | 5 votes |
@GET @Produces(MediaType.TEXT_PLAIN) @Path("/guest") @RequiresGuest public String guest() { return "Welcome Guest"; }
Example #2
Source File: AuthorizationFilter.java From shiro-jersey with Apache License 2.0 | 5 votes |
private static AuthorizingAnnotationHandler createHandler(Annotation annotation) { Class<?> t = annotation.annotationType(); if (RequiresPermissions.class.equals(t)) return new PermissionAnnotationHandler(); else if (RequiresRoles.class.equals(t)) return new RoleAnnotationHandler(); else if (RequiresUser.class.equals(t)) return new UserAnnotationHandler(); else if (RequiresGuest.class.equals(t)) return new GuestAnnotationHandler(); else if (RequiresAuthentication.class.equals(t)) return new AuthenticatedAnnotationHandler(); else throw new IllegalArgumentException("Cannot create a handler for the unknown for annotation " + t); }
Example #3
Source File: AuthorizationFilter.java From shiro-jersey with Apache License 2.0 | 5 votes |
private static AuthorizingAnnotationHandler createHandler(Annotation annotation) { Class<?> t = annotation.annotationType(); if (RequiresPermissions.class.equals(t)) return new PermissionAnnotationHandler(); else if (RequiresRoles.class.equals(t)) return new RoleAnnotationHandler(); else if (RequiresUser.class.equals(t)) return new UserAnnotationHandler(); else if (RequiresGuest.class.equals(t)) return new GuestAnnotationHandler(); else if (RequiresAuthentication.class.equals(t)) return new AuthenticatedAnnotationHandler(); else throw new IllegalArgumentException("Cannot create a handler for the unknown for annotation " + t); }
Example #4
Source File: AdminIndexController.java From dts-shop with GNU Lesser General Public License v3.0 | 4 votes |
@RequiresGuest @RequestMapping("/guest") public Object guest() { return ResponseUtil.ok("hello world, this is admin service"); }
Example #5
Source File: ShiroController.java From jboot with Apache License 2.0 | 4 votes |
@RequiresGuest public void guest(){ renderText("guest"); }
Example #6
Source File: HandlerCreateVisitor.java From tapestry-security with Apache License 2.0 | 4 votes |
@Override public void visitRequiresGuest(RequiresGuest annotation) { handler = new GuestAnnotationHandler(); }
Example #7
Source File: AlphaService.java From tapestry-security with Apache License 2.0 | 4 votes |
@RequiresGuest String invokeRequiresGuest();
Example #8
Source File: MethodAnnotationCaster.java From tapestry-security with Apache License 2.0 | 3 votes |
public void accept(MethodAnnotationCasterVisitor visitor, Annotation annotation) { if (annotation instanceof RequiresPermissions) { visitor.visitRequiresPermissions((RequiresPermissions) annotation); } else if (annotation instanceof RequiresRoles) { visitor.visitRequiresRoles((RequiresRoles) annotation); } else if (annotation instanceof RequiresUser) { visitor.visitRequiresUser((RequiresUser) annotation); } else if (annotation instanceof RequiresGuest) { visitor.visitRequiresGuest((RequiresGuest) annotation); } else if (annotation instanceof RequiresAuthentication) { visitor.visitRequiresAuthentication((RequiresAuthentication) annotation); } else { visitor.visitNotFound(); } }