You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by "Brian Demers (JIRA)" <ji...@apache.org> on 2016/10/14 14:28:21 UTC

[jira] [Updated] (SHIRO-392) Shiro Extension for JAX-RS

     [ https://issues.apache.org/jira/browse/SHIRO-392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Demers updated SHIRO-392:
-------------------------------
    Summary: Shiro Extension for JAX-RS  (was: Shiro Extension for JAX-RS Implementation Sun Jersey)

> Shiro Extension for JAX-RS
> --------------------------
>
>                 Key: SHIRO-392
>                 URL: https://issues.apache.org/jira/browse/SHIRO-392
>             Project: Shiro
>          Issue Type: Improvement
>            Reporter: Jan Stamer
>
> We've added an extension to Shiro which enables Shiro annotations in the JAX-RS implementation Sun Jersey.
> You can do the following with it:
> @Path("/changelog")
> @RequiresPermissions("repository:read")
> public class ChangelogResourceImpl {
>    @POST
>    @Consumes(MediaType.APPLICATION_JSON)
>    @Path("/addObject")
>    @Override
>    @RequiresPermissions("repository:write")
>    public Response addObject(ObjectJson objectJson) {
>       someService.addObject(object);
>       return Response.ok().build();
>    }
> }
> If the user is not authenticated Http Status Code 401 is returned. If the user has insufficient privileges Status Code 403 is returned.
> Right now we've only added support for the annoation @RequiresPermissions. The other Shiro annoations could easily be added in the same fashion. Yet currently that's the only one we need.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)