{"action":"created","comment":{"url":"https://api.github.com/repos/Jasig/cas/pulls/comments/31393287","id":31393287,"diff_hunk":"@@ -56,6 +56,9 @@\n     /** The bearer token. */\n     String BEARER_TOKEN = \"Bearer\";\n     \n+    /** The bearer token in lower case. */\n+    String BEARER_TOKEN_IGNORE_CASE = BEARER_TOKEN.toLowerCase();","path":"cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/OAuthConstants.java","position":5,"original_position":5,"commit_id":"b0834e073b789a91646b70a42a2e94f9c3322f4c","original_commit_id":"b0834e073b789a91646b70a42a2e94f9c3322f4c","user":{"login":"mmoayyed","id":1205228,"avatar_url":"https://avatars.githubusercontent.com/u/1205228?v=3","gravatar_id":"","url":"https://api.github.com/users/mmoayyed","html_url":"https://github.com/mmoayyed","followers_url":"https://api.github.com/users/mmoayyed/followers","following_url":"https://api.github.com/users/mmoayyed/following{/other_user}","gists_url":"https://api.github.com/users/mmoayyed/gists{/gist_id}","starred_url":"https://api.github.com/users/mmoayyed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmoayyed/subscriptions","organizations_url":"https://api.github.com/users/mmoayyed/orgs","repos_url":"https://api.github.com/users/mmoayyed/repos","events_url":"https://api.github.com/users/mmoayyed/events{/privacy}","received_events_url":"https://api.github.com/users/mmoayyed/received_events","type":"User","site_admin":false},"body":"I'd rather you call lowercase on the actual const. This isnt a real const. ","created_at":"2015-05-31T19:00:04Z","updated_at":"2015-05-31T19:00:04Z","html_url":"https://github.com/Jasig/cas/pull/975#discussion_r31393287","pull_request_url":"https://api.github.com/repos/Jasig/cas/pulls/975","_links":{"self":{"href":"https://api.github.com/repos/Jasig/cas/pulls/comments/31393287"},"html":{"href":"https://github.com/Jasig/cas/pull/975#discussion_r31393287"},"pull_request":{"href":"https://api.github.com/repos/Jasig/cas/pulls/975"}}},"pull_request":{"url":"https://api.github.com/repos/Jasig/cas/pulls/975","id":36502197,"html_url":"https://github.com/Jasig/cas/pull/975","diff_url":"https://github.com/Jasig/cas/pull/975.diff","patch_url":"https://github.com/Jasig/cas/pull/975.patch","issue_url":"https://api.github.com/repos/Jasig/cas/issues/975","number":975,"state":"open","locked":false,"title":"OAuth2 - Bearer token handling - Ignore case comparision of bearer token authorization header","user":{"login":"JanuszP","id":654305,"avatar_url":"https://avatars.githubusercontent.com/u/654305?v=3","gravatar_id":"","url":"https://api.github.com/users/JanuszP","html_url":"https://github.com/JanuszP","followers_url":"https://api.github.com/users/JanuszP/followers","following_url":"https://api.github.com/users/JanuszP/following{/other_user}","gists_url":"https://api.github.com/users/JanuszP/gists{/gist_id}","starred_url":"https://api.github.com/users/JanuszP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JanuszP/subscriptions","organizations_url":"https://api.github.com/users/JanuszP/orgs","repos_url":"https://api.github.com/users/JanuszP/repos","events_url":"https://api.github.com/users/JanuszP/events{/privacy}","received_events_url":"https://api.github.com/users/JanuszP/received_events","type":"User","site_admin":false},"body":"Hello,\r\nI'm not sure if this is the right place, yet I'm still encountering problems with how \"Bearer\" keyword is used. Changing \"bearer\" to \"Bearer\" fixed some issues yet it introduced another. Please take a look at:\r\nhttps://github.com/spring-projects/spring-security-oauth/blob/master/spring-security-oauth2/src/main/java/org/springframework/security/oauth2/client/DefaultOAuth2RequestAuthenticator.java#L39\r\n\r\nwhen authorizing request tokenType from Oauth2AccessToken is used (if it exists), default implementation lowercases the \"Bearer\" keyword:\r\n\r\nhttps://github.com/spring-projects/spring-security-oauth/blob/master/spring-security-oauth2/src/main/java/org/springframework/security/oauth2/common/DefaultOAuth2AccessToken.java#L27\r\n\r\nBottom line - being case sensitive in here will probably lead to such problems in the future and they are quite hard to debug. I think it would be best to do a ignorecase comparision. What do you think?","created_at":"2015-05-29T12:53:53Z","updated_at":"2015-05-31T19:00:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96ab1dd2928c0982482a507d2c2aeeb252b77763","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Jasig/cas/pulls/975/commits","review_comments_url":"https://api.github.com/repos/Jasig/cas/pulls/975/comments","review_comment_url":"https://api.github.com/repos/Jasig/cas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Jasig/cas/issues/975/comments","statuses_url":"https://api.github.com/repos/Jasig/cas/statuses/b0834e073b789a91646b70a42a2e94f9c3322f4c","head":{"label":"JanuszP:patch-1","ref":"patch-1","sha":"b0834e073b789a91646b70a42a2e94f9c3322f4c","user":{"login":"JanuszP","id":654305,"avatar_url":"https://avatars.githubusercontent.com/u/654305?v=3","gravatar_id":"","url":"https://api.github.com/users/JanuszP","html_url":"https://github.com/JanuszP","followers_url":"https://api.github.com/users/JanuszP/followers","following_url":"https://api.github.com/users/JanuszP/following{/other_user}","gists_url":"https://api.github.com/users/JanuszP/gists{/gist_id}","starred_url":"https://api.github.com/users/JanuszP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JanuszP/subscriptions","organizations_url":"https://api.github.com/users/JanuszP/orgs","repos_url":"https://api.github.com/users/JanuszP/repos","events_url":"https://api.github.com/users/JanuszP/events{/privacy}","received_events_url":"https://api.github.com/users/JanuszP/received_events","type":"User","site_admin":false},"repo":{"id":36354697,"name":"cas","full_name":"JanuszP/cas","owner":{"login":"JanuszP","id":654305,"avatar_url":"https://avatars.githubusercontent.com/u/654305?v=3","gravatar_id":"","url":"https://api.github.com/users/JanuszP","html_url":"https://github.com/JanuszP","followers_url":"https://api.github.com/users/JanuszP/followers","following_url":"https://api.github.com/users/JanuszP/following{/other_user}","gists_url":"https://api.github.com/users/JanuszP/gists{/gist_id}","starred_url":"https://api.github.com/users/JanuszP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JanuszP/subscriptions","organizations_url":"https://api.github.com/users/JanuszP/orgs","repos_url":"https://api.github.com/users/JanuszP/repos","events_url":"https://api.github.com/users/JanuszP/events{/privacy}","received_events_url":"https://api.github.com/users/JanuszP/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JanuszP/cas","description":"Apereo CAS - Single Sign On for the Web","fork":true,"url":"https://api.github.com/repos/JanuszP/cas","forks_url":"https://api.github.com/repos/JanuszP/cas/forks","keys_url":"https://api.github.com/repos/JanuszP/cas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JanuszP/cas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JanuszP/cas/teams","hooks_url":"https://api.github.com/repos/JanuszP/cas/hooks","issue_events_url":"https://api.github.com/repos/JanuszP/cas/issues/events{/number}","events_url":"https://api.github.com/repos/JanuszP/cas/events","assignees_url":"https://api.github.com/repos/JanuszP/cas/assignees{/user}","branches_url":"https://api.github.com/repos/JanuszP/cas/branches{/branch}","tags_url":"https://api.github.com/repos/JanuszP/cas/tags","blobs_url":"https://api.github.com/repos/JanuszP/cas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JanuszP/cas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JanuszP/cas/git/refs{/sha}","trees_url":"https://api.github.com/repos/JanuszP/cas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JanuszP/cas/statuses/{sha}","languages_url":"https://api.github.com/repos/JanuszP/cas/languages","stargazers_url":"https://api.github.com/repos/JanuszP/cas/stargazers","contributors_url":"https://api.github.com/repos/JanuszP/cas/contributors","subscribers_url":"https://api.github.com/repos/JanuszP/cas/subscribers","subscription_url":"https://api.github.com/repos/JanuszP/cas/subscription","commits_url":"https://api.github.com/repos/JanuszP/cas/commits{/sha}","git_commits_url":"https://api.github.com/repos/JanuszP/cas/git/commits{/sha}","comments_url":"https://api.github.com/repos/JanuszP/cas/comments{/number}","issue_comment_url":"https://api.github.com/repos/JanuszP/cas/issues/comments{/number}","contents_url":"https://api.github.com/repos/JanuszP/cas/contents/{+path}","compare_url":"https://api.github.com/repos/JanuszP/cas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JanuszP/cas/merges","archive_url":"https://api.github.com/repos/JanuszP/cas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JanuszP/cas/downloads","issues_url":"https://api.github.com/repos/JanuszP/cas/issues{/number}","pulls_url":"https://api.github.com/repos/JanuszP/cas/pulls{/number}","milestones_url":"https://api.github.com/repos/JanuszP/cas/milestones{/number}","notifications_url":"https://api.github.com/repos/JanuszP/cas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JanuszP/cas/labels{/name}","releases_url":"https://api.github.com/repos/JanuszP/cas/releases{/id}","created_at":"2015-05-27T08:46:31Z","updated_at":"2015-05-27T08:46:42Z","pushed_at":"2015-05-29T12:27:23Z","git_url":"git://github.com/JanuszP/cas.git","ssh_url":"git@github.com:JanuszP/cas.git","clone_url":"https://github.com/JanuszP/cas.git","svn_url":"https://github.com/JanuszP/cas","homepage":"https://www.apereo.org/cas","size":444698,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Jasig:master","ref":"master","sha":"6c3df3a5f42d2d8b771ba773aeda3ba5a4c525e3","user":{"login":"Jasig","id":884285,"avatar_url":"https://avatars.githubusercontent.com/u/884285?v=3","gravatar_id":"","url":"https://api.github.com/users/Jasig","html_url":"https://github.com/Jasig","followers_url":"https://api.github.com/users/Jasig/followers","following_url":"https://api.github.com/users/Jasig/following{/other_user}","gists_url":"https://api.github.com/users/Jasig/gists{/gist_id}","starred_url":"https://api.github.com/users/Jasig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jasig/subscriptions","organizations_url":"https://api.github.com/users/Jasig/orgs","repos_url":"https://api.github.com/users/Jasig/repos","events_url":"https://api.github.com/users/Jasig/events{/privacy}","received_events_url":"https://api.github.com/users/Jasig/received_events","type":"Organization","site_admin":false},"repo":{"id":2352744,"name":"cas","full_name":"Jasig/cas","owner":{"login":"Jasig","id":884285,"avatar_url":"https://avatars.githubusercontent.com/u/884285?v=3","gravatar_id":"","url":"https://api.github.com/users/Jasig","html_url":"https://github.com/Jasig","followers_url":"https://api.github.com/users/Jasig/followers","following_url":"https://api.github.com/users/Jasig/following{/other_user}","gists_url":"https://api.github.com/users/Jasig/gists{/gist_id}","starred_url":"https://api.github.com/users/Jasig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jasig/subscriptions","organizations_url":"https://api.github.com/users/Jasig/orgs","repos_url":"https://api.github.com/users/Jasig/repos","events_url":"https://api.github.com/users/Jasig/events{/privacy}","received_events_url":"https://api.github.com/users/Jasig/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Jasig/cas","description":"Apereo CAS - Single Sign On for the Web","fork":false,"url":"https://api.github.com/repos/Jasig/cas","forks_url":"https://api.github.com/repos/Jasig/cas/forks","keys_url":"https://api.github.com/repos/Jasig/cas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Jasig/cas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Jasig/cas/teams","hooks_url":"https://api.github.com/repos/Jasig/cas/hooks","issue_events_url":"https://api.github.com/repos/Jasig/cas/issues/events{/number}","events_url":"https://api.github.com/repos/Jasig/cas/events","assignees_url":"https://api.github.com/repos/Jasig/cas/assignees{/user}","branches_url":"https://api.github.com/repos/Jasig/cas/branches{/branch}","tags_url":"https://api.github.com/repos/Jasig/cas/tags","blobs_url":"https://api.github.com/repos/Jasig/cas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Jasig/cas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Jasig/cas/git/refs{/sha}","trees_url":"https://api.github.com/repos/Jasig/cas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Jasig/cas/statuses/{sha}","languages_url":"https://api.github.com/repos/Jasig/cas/languages","stargazers_url":"https://api.github.com/repos/Jasig/cas/stargazers","contributors_url":"https://api.github.com/repos/Jasig/cas/contributors","subscribers_url":"https://api.github.com/repos/Jasig/cas/subscribers","subscription_url":"https://api.github.com/repos/Jasig/cas/subscription","commits_url":"https://api.github.com/repos/Jasig/cas/commits{/sha}","git_commits_url":"https://api.github.com/repos/Jasig/cas/git/commits{/sha}","comments_url":"https://api.github.com/repos/Jasig/cas/comments{/number}","issue_comment_url":"https://api.github.com/repos/Jasig/cas/issues/comments{/number}","contents_url":"https://api.github.com/repos/Jasig/cas/contents/{+path}","compare_url":"https://api.github.com/repos/Jasig/cas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Jasig/cas/merges","archive_url":"https://api.github.com/repos/Jasig/cas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Jasig/cas/downloads","issues_url":"https://api.github.com/repos/Jasig/cas/issues{/number}","pulls_url":"https://api.github.com/repos/Jasig/cas/pulls{/number}","milestones_url":"https://api.github.com/repos/Jasig/cas/milestones{/number}","notifications_url":"https://api.github.com/repos/Jasig/cas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Jasig/cas/labels{/name}","releases_url":"https://api.github.com/repos/Jasig/cas/releases{/id}","created_at":"2011-09-09T01:36:42Z","updated_at":"2015-05-31T12:45:51Z","pushed_at":"2015-05-29T14:15:29Z","git_url":"git://github.com/Jasig/cas.git","ssh_url":"git@github.com:Jasig/cas.git","clone_url":"https://github.com/Jasig/cas.git","svn_url":"https://github.com/Jasig/cas","homepage":"https://www.apereo.org/cas","size":486118,"stargazers_count":695,"watchers_count":695,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":524,"mirror_url":null,"open_issues_count":67,"forks":524,"open_issues":67,"watchers":695,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Jasig/cas/pulls/975"},"html":{"href":"https://github.com/Jasig/cas/pull/975"},"issue":{"href":"https://api.github.com/repos/Jasig/cas/issues/975"},"comments":{"href":"https://api.github.com/repos/Jasig/cas/issues/975/comments"},"review_comments":{"href":"https://api.github.com/repos/Jasig/cas/pulls/975/comments"},"review_comment":{"href":"https://api.github.com/repos/Jasig/cas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Jasig/cas/pulls/975/commits"},"statuses":{"href":"https://api.github.com/repos/Jasig/cas/statuses/b0834e073b789a91646b70a42a2e94f9c3322f4c"}}}}