{"action":"created","issue":{"url":"https://api.github.com/repos/russellchang54/auth-server/issues/2","repository_url":"https://api.github.com/repos/russellchang54/auth-server","labels_url":"https://api.github.com/repos/russellchang54/auth-server/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/russellchang54/auth-server/issues/2/comments","events_url":"https://api.github.com/repos/russellchang54/auth-server/issues/2/events","html_url":"https://github.com/russellchang54/auth-server/issues/2","id":235043565,"number":2,"title":"Daily-note","user":{"login":"russellchang54","id":7529984,"avatar_url":"https://avatars3.githubusercontent.com/u/7529984?v=4","gravatar_id":"","url":"https://api.github.com/users/russellchang54","html_url":"https://github.com/russellchang54","followers_url":"https://api.github.com/users/russellchang54/followers","following_url":"https://api.github.com/users/russellchang54/following{/other_user}","gists_url":"https://api.github.com/users/russellchang54/gists{/gist_id}","starred_url":"https://api.github.com/users/russellchang54/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/russellchang54/subscriptions","organizations_url":"https://api.github.com/users/russellchang54/orgs","repos_url":"https://api.github.com/users/russellchang54/repos","events_url":"https://api.github.com/users/russellchang54/events{/privacy}","received_events_url":"https://api.github.com/users/russellchang54/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-06-11T04:56:31Z","updated_at":"2017-07-21T14:42:20Z","closed_at":null,"body":"资源服务器验证token的方式：\r\n1，本地验签及解码token，\r\n资源服务器的配置文件里，security.oauth2.resource.jwt.key-value，提供配置项，配置验签的公钥(密钥)；或者认证服务器(OAuth2 provider)提供API,给资源服务器调用，获取验签的公钥(密钥)；security.oauth2.resource.jwt.key-uri.\r\n\r\n2，远程验签及解码token：认证服务器提供两个API，security.oauth2.resource.user-info-uri 和 security.oauth2.resource.token-info-uri，给资源服务器调用,由认证服务器验签及解码token.\r\n\r\nOAuth2 resources are protected by a filter chain with order【 security.oauth2.resource.filter-order】 and the default is after the filter protecting the actuator endpoints by default (so actuator endpoints will stay on HTTP Basic unless you change the order).\r\n\r\n\r\nOAuth2 client\r\n开启 @EnableOAuth2Client\r\n一个client 就是一个独立的UI，跟资源服务器的区别是：\r\n一个资源服务器是一组受token保护的APIs，各API之间有内在的逻辑/业务关系，例如一个功能模块。每个资源服务器的配置文件里都有token验签的公钥，向外部提供一项业务能力。\r\n一个client，就是一个独立的系统（UI），相对于OAuth2 provider而言。一个client/UI背后有多个资源服务器构成，一个client的配置文件里除了有 OAuth2 Provider 验签的公钥，还有clientId，clientSecret，accessTokenUri，userAuthorizationUri，clientAuthenticationScheme。例如：\r\nsecurity:\r\n    oauth2:\r\n        client:\r\n            clientId: bd1c0a783ccdd1c9b9e4\r\n            clientSecret: 1a9030fbca47a5b2c28e92f19050bb77824b5ad1\r\n            accessTokenUri: https://github.com/login/oauth/access_token\r\n            userAuthorizationUri: https://github.com/login/oauth/authorize\r\n            clientAuthenticationScheme: form\r\n\r\nSince all paths are secure by default。默认所有的URL都是受保护的"},"comment":{"url":"https://api.github.com/repos/russellchang54/auth-server/issues/comments/317019665","html_url":"https://github.com/russellchang54/auth-server/issues/2#issuecomment-317019665","issue_url":"https://api.github.com/repos/russellchang54/auth-server/issues/2","id":317019665,"user":{"login":"russellchang54","id":7529984,"avatar_url":"https://avatars3.githubusercontent.com/u/7529984?v=4","gravatar_id":"","url":"https://api.github.com/users/russellchang54","html_url":"https://github.com/russellchang54","followers_url":"https://api.github.com/users/russellchang54/followers","following_url":"https://api.github.com/users/russellchang54/following{/other_user}","gists_url":"https://api.github.com/users/russellchang54/gists{/gist_id}","starred_url":"https://api.github.com/users/russellchang54/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/russellchang54/subscriptions","organizations_url":"https://api.github.com/users/russellchang54/orgs","repos_url":"https://api.github.com/users/russellchang54/repos","events_url":"https://api.github.com/users/russellchang54/events{/privacy}","received_events_url":"https://api.github.com/users/russellchang54/received_events","type":"User","site_admin":false},"created_at":"2017-07-21T14:42:20Z","updated_at":"2017-07-21T14:42:20Z","body":"How to add filter after the HTTP BasicAuthenticationFilter when using @EnableAuthorizationServer\r\nhttps://stackoverflow.com/questions/29736231/how-to-add-filter-after-the-http-basicauthenticationfilter-when-using-enableaut\r\n\r\nHow to perform actions on successful login via OAuth2 in jhipster\r\nhttps://stackoverflow.com/questions/34545046/how-to-perform-actions-on-successful-login-via-oauth2-in-jhipster"}}
{"actor":{"display_login":"russellchang54"}}