{"action":"created","issue":{"url":"https://api.github.com/repos/pac4j/jax-rs-pac4j/issues/10","repository_url":"https://api.github.com/repos/pac4j/jax-rs-pac4j","labels_url":"https://api.github.com/repos/pac4j/jax-rs-pac4j/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/pac4j/jax-rs-pac4j/issues/10/comments","events_url":"https://api.github.com/repos/pac4j/jax-rs-pac4j/issues/10/events","html_url":"https://github.com/pac4j/jax-rs-pac4j/issues/10","id":194103536,"number":10,"title":"Pac4JSecurityFeature should look for annotations in superclass/interface","user":{"login":"andriusvelykis","id":1573997,"avatar_url":"https://avatars.githubusercontent.com/u/1573997?v=3","gravatar_id":"","url":"https://api.github.com/users/andriusvelykis","html_url":"https://github.com/andriusvelykis","followers_url":"https://api.github.com/users/andriusvelykis/followers","following_url":"https://api.github.com/users/andriusvelykis/following{/other_user}","gists_url":"https://api.github.com/users/andriusvelykis/gists{/gist_id}","starred_url":"https://api.github.com/users/andriusvelykis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andriusvelykis/subscriptions","organizations_url":"https://api.github.com/users/andriusvelykis/orgs","repos_url":"https://api.github.com/users/andriusvelykis/repos","events_url":"https://api.github.com/users/andriusvelykis/events{/privacy}","received_events_url":"https://api.github.com/users/andriusvelykis/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-07T16:50:39Z","updated_at":"2016-12-08T10:36:43Z","closed_at":"2016-12-08T10:35:57Z","body":"I am having trouble with `@Pac4JSecurity` annotations not being located on resource class/methods when the resource class had been dynamically extended (e.g. via a `javassist` `ProxyFactory`).\r\n\r\nThe annotation getters in [`Pac4JSecurityFeature`](https://github.com/pac4j/jax-rs-pac4j/blob/9066cf4b42fadee15de9d6c3dcfdd8398b2deac5/src/main/java/org/pac4j/jax/rs/features/Pac4JSecurityFeature.java#L58) only check the class itself for annotations and does not continue with superclass or interface. In comparison, similar `DynamicFeature` implementations in Jersey use [`org.glassfish.jersey.server.model.AnnotatedMethod`](https://github.com/jersey/jersey/blob/562bd63513cdfba9fce7556808926ca29f38cfe2/core-server/src/main/java/org/glassfish/jersey/server/model/AnnotatedMethod.java) utility class (or other similar reflection utils), which has a more elaborate logic of locating annotations. Could something like that be ported/reused in `jax-rs-pac4j`?\r\n\r\nThe actual issue cropped up when using `dropwizard-pac4j` in a Dropwizard application with a subresource instantiated via a `UnitOfWorkAwareProxyFactory` (suggested as a workaround in dropwizard/dropwizard#1806). This creates a proxy subclass of a sub-resource and the pac4j annotations are lost. \r\n\r\nWhile that use case would go away with some future version of Dropwizard, the general problem with `Pac4JSecurityFeature` as described should still be valid in general.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/pac4j/jax-rs-pac4j/issues/comments/265708640","html_url":"https://github.com/pac4j/jax-rs-pac4j/issues/10#issuecomment-265708640","issue_url":"https://api.github.com/repos/pac4j/jax-rs-pac4j/issues/10","id":265708640,"user":{"login":"victornoel","id":160975,"avatar_url":"https://avatars.githubusercontent.com/u/160975?v=3","gravatar_id":"","url":"https://api.github.com/users/victornoel","html_url":"https://github.com/victornoel","followers_url":"https://api.github.com/users/victornoel/followers","following_url":"https://api.github.com/users/victornoel/following{/other_user}","gists_url":"https://api.github.com/users/victornoel/gists{/gist_id}","starred_url":"https://api.github.com/users/victornoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victornoel/subscriptions","organizations_url":"https://api.github.com/users/victornoel/orgs","repos_url":"https://api.github.com/users/victornoel/repos","events_url":"https://api.github.com/users/victornoel/events{/privacy}","received_events_url":"https://api.github.com/users/victornoel/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T10:36:43Z","updated_at":"2016-12-08T10:36:43Z","body":"@andriusvelykis could you check that everything is ok with the latest SNAPSHOT? (you can retrieve it from sonatype's OSS Snapshot repository, documented in the README)"}}
{"actor":{"display_login":"victornoel"}}