{"action":"created","comment":{"url":"https://api.github.com/repos/pac4j/jersey-pac4j/pulls/comments/80852739","pull_request_review_id":1876567,"id":80852739,"diff_hunk":"@@ -0,0 +1,42 @@\n+package org.pac4j.jax.rs.annotations;\n+\n+import java.lang.annotation.Documented;\n+import java.lang.annotation.ElementType;\n+import java.lang.annotation.Retention;\n+import java.lang.annotation.RetentionPolicy;\n+import java.lang.annotation.Target;\n+\n+import org.pac4j.jax.rs.filter.SecurityFilter;\n+\n+/**\n+ * \n+ * Identify the class or method as being filtered by {@link SecurityFilter}.\n+ * \n+ * @author Victor Noel - Linagora\n+ *\n+ */\n+@Target({ ElementType.METHOD })\n+@Retention(RetentionPolicy.RUNTIME)\n+@Documented\n+public @interface Pac4JSecurity {\n+\n+    /**\n+     * @return value for {@link SecurityFilter#setAuthorizers(String)}\n+     */\n+    String[] value() default {};","path":"src/main/java/org/pac4j/jax/rs/annotations/Pac4JSecurity.java","position":null,"original_position":26,"commit_id":"beabc6717d5c6b96e8af666d676cb24952ad055c","original_commit_id":"769ec0e4559d657a4c42df56a39eec70d4edfddb","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},"body":"I understand, but they will be anyway converted to the required format for all those components, it is just that at the annotation level, it would be safer to use an array. Is that alright?","created_at":"2016-09-28T06:55:56Z","updated_at":"2016-09-28T06:55:57Z","html_url":"https://github.com/pac4j/jersey-pac4j/pull/1#discussion_r80852739","pull_request_url":"https://api.github.com/repos/pac4j/jersey-pac4j/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/pac4j/jersey-pac4j/pulls/comments/80852739"},"html":{"href":"https://github.com/pac4j/jersey-pac4j/pull/1#discussion_r80852739"},"pull_request":{"href":"https://api.github.com/repos/pac4j/jersey-pac4j/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/pac4j/jersey-pac4j/pulls/1","id":86746426,"html_url":"https://github.com/pac4j/jersey-pac4j/pull/1","diff_url":"https://github.com/pac4j/jersey-pac4j/pull/1.diff","patch_url":"https://github.com/pac4j/jersey-pac4j/pull/1.patch","issue_url":"https://api.github.com/repos/pac4j/jersey-pac4j/issues/1","number":1,"state":"open","locked":false,"title":"Integration with JAX-RS","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},"body":"This provides:\r\n\r\n - Some filters (similar to those from j2e) for authorization, callback and logout integrated with JAX-RS abstractions. Note:\r\n    - In the case of callback and logout, response handling by pac4j can be skipped and it is the default because it is coherent with RESTful APIs which do not use redirects in the same way that typical web apps.\r\n - A JAX-RS Feature that attaches filters to specific resource methods based on annotations. For now they are supported only at the method level, but in the future class-level and override should be implemented.\r\n - A Jersey parameter provider to inject the current pac4j profile in resources methods.\r\n\r\nAlso:\r\n\r\n - The POM file is heavily inspired by the j2e integration\r\n - The README is not written yet\r\n - There is no travis integration\r\n - This PR relies on #689\r\n\r\nIn the end, except for `Pac4JProfileValueFactoryProvider`, this only relies on jax-rs and the servlet api.\r\nTheoretically, jax-rs is not tied to servlet, but most of the jax-rs implementations are, so it's ok for now, but in the long run it would be best to be servlet-agnostic. It is possible by implementing `WebContext` fully without servlet abstractions (for now we extend `J2EContext` and override the response methods) but I think this will requires to redesign WebContext because it has been designed for servlet abstractions I think…\r\n\r\nThe same type of questions arises also around the way HttpAction is used to manipulate the response which is very servlet-style. Also, the fact that jax-rs is made to build restful APIs (i.e. not serving webpages and usually not exploiting redirects in the same way as it is usually done) made me integrate some workaround for that. For now it is ok though :)","created_at":"2016-09-26T13:52:56Z","updated_at":"2016-09-28T06:55:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f392e38cb7b8730a07b8bb74a46dd10408115395","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pac4j/jersey-pac4j/pulls/1/commits","review_comments_url":"https://api.github.com/repos/pac4j/jersey-pac4j/pulls/1/comments","review_comment_url":"https://api.github.com/repos/pac4j/jersey-pac4j/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pac4j/jersey-pac4j/issues/1/comments","statuses_url":"https://api.github.com/repos/pac4j/jersey-pac4j/statuses/beabc6717d5c6b96e8af666d676cb24952ad055c","head":{"label":"victornoel:master","ref":"master","sha":"beabc6717d5c6b96e8af666d676cb24952ad055c","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},"repo":{"id":69241548,"name":"jersey-pac4j","full_name":"victornoel/jersey-pac4j","owner":{"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},"private":false,"html_url":"https://github.com/victornoel/jersey-pac4j","description":"Security library for JAX-RS and Jersey","fork":true,"url":"https://api.github.com/repos/victornoel/jersey-pac4j","forks_url":"https://api.github.com/repos/victornoel/jersey-pac4j/forks","keys_url":"https://api.github.com/repos/victornoel/jersey-pac4j/keys{/key_id}","collaborators_url":"https://api.github.com/repos/victornoel/jersey-pac4j/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/victornoel/jersey-pac4j/teams","hooks_url":"https://api.github.com/repos/victornoel/jersey-pac4j/hooks","issue_events_url":"https://api.github.com/repos/victornoel/jersey-pac4j/issues/events{/number}","events_url":"https://api.github.com/repos/victornoel/jersey-pac4j/events","assignees_url":"https://api.github.com/repos/victornoel/jersey-pac4j/assignees{/user}","branches_url":"https://api.github.com/repos/victornoel/jersey-pac4j/branches{/branch}","tags_url":"https://api.github.com/repos/victornoel/jersey-pac4j/tags","blobs_url":"https://api.github.com/repos/victornoel/jersey-pac4j/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/victornoel/jersey-pac4j/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/victornoel/jersey-pac4j/git/refs{/sha}","trees_url":"https://api.github.com/repos/victornoel/jersey-pac4j/git/trees{/sha}","statuses_url":"https://api.github.com/repos/victornoel/jersey-pac4j/statuses/{sha}","languages_url":"https://api.github.com/repos/victornoel/jersey-pac4j/languages","stargazers_url":"https://api.github.com/repos/victornoel/jersey-pac4j/stargazers","contributors_url":"https://api.github.com/repos/victornoel/jersey-pac4j/contributors","subscribers_url":"https://api.github.com/repos/victornoel/jersey-pac4j/subscribers","subscription_url":"https://api.github.com/repos/victornoel/jersey-pac4j/subscription","commits_url":"https://api.github.com/repos/victornoel/jersey-pac4j/commits{/sha}","git_commits_url":"https://api.github.com/repos/victornoel/jersey-pac4j/git/commits{/sha}","comments_url":"https://api.github.com/repos/victornoel/jersey-pac4j/comments{/number}","issue_comment_url":"https://api.github.com/repos/victornoel/jersey-pac4j/issues/comments{/number}","contents_url":"https://api.github.com/repos/victornoel/jersey-pac4j/contents/{+path}","compare_url":"https://api.github.com/repos/victornoel/jersey-pac4j/compare/{base}...{head}","merges_url":"https://api.github.com/repos/victornoel/jersey-pac4j/merges","archive_url":"https://api.github.com/repos/victornoel/jersey-pac4j/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/victornoel/jersey-pac4j/downloads","issues_url":"https://api.github.com/repos/victornoel/jersey-pac4j/issues{/number}","pulls_url":"https://api.github.com/repos/victornoel/jersey-pac4j/pulls{/number}","milestones_url":"https://api.github.com/repos/victornoel/jersey-pac4j/milestones{/number}","notifications_url":"https://api.github.com/repos/victornoel/jersey-pac4j/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/victornoel/jersey-pac4j/labels{/name}","releases_url":"https://api.github.com/repos/victornoel/jersey-pac4j/releases{/id}","deployments_url":"https://api.github.com/repos/victornoel/jersey-pac4j/deployments","created_at":"2016-09-26T11:01:21Z","updated_at":"2016-09-26T13:44:12Z","pushed_at":"2016-09-27T14:22:40Z","git_url":"git://github.com/victornoel/jersey-pac4j.git","ssh_url":"git@github.com:victornoel/jersey-pac4j.git","clone_url":"https://github.com/victornoel/jersey-pac4j.git","svn_url":"https://github.com/victornoel/jersey-pac4j","homepage":"http://www.pac4j.org","size":14,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pac4j:master","ref":"master","sha":"d97afa949215d0de50afd2d5c7af483db3e35d9b","user":{"login":"pac4j","id":7540865,"avatar_url":"https://avatars.githubusercontent.com/u/7540865?v=3","gravatar_id":"","url":"https://api.github.com/users/pac4j","html_url":"https://github.com/pac4j","followers_url":"https://api.github.com/users/pac4j/followers","following_url":"https://api.github.com/users/pac4j/following{/other_user}","gists_url":"https://api.github.com/users/pac4j/gists{/gist_id}","starred_url":"https://api.github.com/users/pac4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pac4j/subscriptions","organizations_url":"https://api.github.com/users/pac4j/orgs","repos_url":"https://api.github.com/users/pac4j/repos","events_url":"https://api.github.com/users/pac4j/events{/privacy}","received_events_url":"https://api.github.com/users/pac4j/received_events","type":"Organization","site_admin":false},"repo":{"id":69044045,"name":"jersey-pac4j","full_name":"pac4j/jersey-pac4j","owner":{"login":"pac4j","id":7540865,"avatar_url":"https://avatars.githubusercontent.com/u/7540865?v=3","gravatar_id":"","url":"https://api.github.com/users/pac4j","html_url":"https://github.com/pac4j","followers_url":"https://api.github.com/users/pac4j/followers","following_url":"https://api.github.com/users/pac4j/following{/other_user}","gists_url":"https://api.github.com/users/pac4j/gists{/gist_id}","starred_url":"https://api.github.com/users/pac4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pac4j/subscriptions","organizations_url":"https://api.github.com/users/pac4j/orgs","repos_url":"https://api.github.com/users/pac4j/repos","events_url":"https://api.github.com/users/pac4j/events{/privacy}","received_events_url":"https://api.github.com/users/pac4j/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pac4j/jersey-pac4j","description":"Security library for JAX-RS and Jersey","fork":false,"url":"https://api.github.com/repos/pac4j/jersey-pac4j","forks_url":"https://api.github.com/repos/pac4j/jersey-pac4j/forks","keys_url":"https://api.github.com/repos/pac4j/jersey-pac4j/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pac4j/jersey-pac4j/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pac4j/jersey-pac4j/teams","hooks_url":"https://api.github.com/repos/pac4j/jersey-pac4j/hooks","issue_events_url":"https://api.github.com/repos/pac4j/jersey-pac4j/issues/events{/number}","events_url":"https://api.github.com/repos/pac4j/jersey-pac4j/events","assignees_url":"https://api.github.com/repos/pac4j/jersey-pac4j/assignees{/user}","branches_url":"https://api.github.com/repos/pac4j/jersey-pac4j/branches{/branch}","tags_url":"https://api.github.com/repos/pac4j/jersey-pac4j/tags","blobs_url":"https://api.github.com/repos/pac4j/jersey-pac4j/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pac4j/jersey-pac4j/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pac4j/jersey-pac4j/git/refs{/sha}","trees_url":"https://api.github.com/repos/pac4j/jersey-pac4j/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pac4j/jersey-pac4j/statuses/{sha}","languages_url":"https://api.github.com/repos/pac4j/jersey-pac4j/languages","stargazers_url":"https://api.github.com/repos/pac4j/jersey-pac4j/stargazers","contributors_url":"https://api.github.com/repos/pac4j/jersey-pac4j/contributors","subscribers_url":"https://api.github.com/repos/pac4j/jersey-pac4j/subscribers","subscription_url":"https://api.github.com/repos/pac4j/jersey-pac4j/subscription","commits_url":"https://api.github.com/repos/pac4j/jersey-pac4j/commits{/sha}","git_commits_url":"https://api.github.com/repos/pac4j/jersey-pac4j/git/commits{/sha}","comments_url":"https://api.github.com/repos/pac4j/jersey-pac4j/comments{/number}","issue_comment_url":"https://api.github.com/repos/pac4j/jersey-pac4j/issues/comments{/number}","contents_url":"https://api.github.com/repos/pac4j/jersey-pac4j/contents/{+path}","compare_url":"https://api.github.com/repos/pac4j/jersey-pac4j/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pac4j/jersey-pac4j/merges","archive_url":"https://api.github.com/repos/pac4j/jersey-pac4j/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pac4j/jersey-pac4j/downloads","issues_url":"https://api.github.com/repos/pac4j/jersey-pac4j/issues{/number}","pulls_url":"https://api.github.com/repos/pac4j/jersey-pac4j/pulls{/number}","milestones_url":"https://api.github.com/repos/pac4j/jersey-pac4j/milestones{/number}","notifications_url":"https://api.github.com/repos/pac4j/jersey-pac4j/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pac4j/jersey-pac4j/labels{/name}","releases_url":"https://api.github.com/repos/pac4j/jersey-pac4j/releases{/id}","deployments_url":"https://api.github.com/repos/pac4j/jersey-pac4j/deployments","created_at":"2016-09-23T16:54:07Z","updated_at":"2016-09-23T16:54:59Z","pushed_at":"2016-09-27T14:22:40Z","git_url":"git://github.com/pac4j/jersey-pac4j.git","ssh_url":"git@github.com:pac4j/jersey-pac4j.git","clone_url":"https://github.com/pac4j/jersey-pac4j.git","svn_url":"https://github.com/pac4j/jersey-pac4j","homepage":"http://www.pac4j.org","size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pac4j/jersey-pac4j/pulls/1"},"html":{"href":"https://github.com/pac4j/jersey-pac4j/pull/1"},"issue":{"href":"https://api.github.com/repos/pac4j/jersey-pac4j/issues/1"},"comments":{"href":"https://api.github.com/repos/pac4j/jersey-pac4j/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/pac4j/jersey-pac4j/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/pac4j/jersey-pac4j/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pac4j/jersey-pac4j/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/pac4j/jersey-pac4j/statuses/beabc6717d5c6b96e8af666d676cb24952ad055c"}}}}
{"actor":{"display_login":"victornoel"}}