users@jersey.java.net

[Jersey] Re: Options method not aware of _at_RolesAllowed annotation

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Thu, 01 Sep 2011 17:19:25 +0200

Hello Sebastian,

On 8/29/11 9:43 PM, zeven wrote:
> Hi,
>
> When i send a request to a resource with the OPTIONS http method, i get a
> list of methods in the 'Allow' header, but the list seems like not taking
> into account the @RolesAllowed annotation.
hmm..
>
> I supposed that the OPTIONS logic is handled by jersey according to the rest
> of annotations but maybe i was wrong.
that is true, OPTIONS is handled by Jersey.
>
> It is that correct and this is a bug or is it a missunderstanding of mine
> about this REST concept?
Well, RolesAllowed annotation is not directly supported in
specification, Jersey supports it via RolesAllowedResourceFilter but
this is related only to incoming requests and computation of "Allow"
header returned to OPTIONS request. I guess it should be considered as
an enhancement rather than a bug/issue, depends on how strong is your
justification/usecase.

Please file it into our issue tracker: http://java.net/jira/browse/JERSEY

thanks!
Pavel


>
> Thanks in advance
> Sebastian
>
>
>
> --
> View this message in context: http://jersey.576304.n2.nabble.com/Options-method-not-aware-of-RolesAllowed-annotation-tp6739217p6739217.html
> Sent from the Jersey mailing list archive at Nabble.com.
>