Options method not aware of @RolesAllowed annotation

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Options method not aware of @RolesAllowed annotation

zeven
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.

I supposed that the OPTIONS logic is handled by jersey according to the rest of annotations but maybe i was wrong.
It is that correct and this is a bug or is it a missunderstanding of mine about this REST concept?

Thanks in advance
Sebastian

Reply | Threaded
Open this post in threaded view
|

Re: Options method not aware of @RolesAllowed annotation

Pavel Bucek-2
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.
>

Reply | Threaded
Open this post in threaded view
|

Re: Options method not aware of @RolesAllowed annotation

zeven
H Pavel,

I just added an issue (JERSEY-762)

Thanks.