登录地址(get): 说明:初始地址必须是下面的url,如果不用这个url,则登录成功后不会自动跳转到授权页面 url: http://localhost:9009/oauth/authorize?client_id=client&response_type=code&scope=all&redirect_uri=http://www.baidu.com 刷新token(post): url: /oauth/token?grant_type=refresh_token&refresh_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicmVzb3VyY2UzMTIiXSwidXNlcl9uYW1lIjoiemhhbmdzYW4iLCJzY29wZSI6WyJhbGwiXSwiYXRpIjoiZmNlMzM1MDctNmJhMC00OTk0LWJiY2YtMjBmZGI4MGE2MjNhIiwibW9iaWxlIjoiMTUzMTIyNzg5MDkiLCJleHAiOjE2MDY4NzA1NDQsInVzZXJJZCI6MSwiYXV0aG9yaXRpZXMiOlsiUk9MRV8xIiwiUk9MRV8yIl0sImp0aSI6IjMxNDViODJlLTdlNDctNDdjYS1hMzUwLWE5NzI4YjMyNTM2NCIsImF1dGhvcml0eUNvZGVMaXN0IjpbImhpZ2hlc3QiLCJjb21tb24iLCJtZWRpdW0iLCJzeXN0ZW0iLCJ1c2VyIiwibWVudSIsImRpY3QiLCJyb2xlIiwiY29tbW9uIiwidXNlciJdLCJjbGllbnRfaWQiOiJjbGllbnQifQ.6gJuvjQSBZoO6pjhQdKZuvzmwNqjz7jVAQTEC0DLh3c&client_id=client&client_secret=secret 一、授权码模式 申请令牌(post): 说明: 请求成功后,在浏览器的url后面会有/?code=xgTr3A, code的值就是获取令牌的code值 url: http://localhost:8008/oauth/authorize?client_id=client&response_type=code&scope=all&redirect_uri=http://www.baidu.com 获取令牌(post): 说明: code只有使用一次 url: /oauth/token?client_id=client&client_secret=secret&grant_type=authorization_code&code=5PgfcD&redirect_uri=http://www.baidu.com 二、简单模式 申请令牌(get): 说明: 没有服务器端的第三方单页面应用,因为没有服务器就无法接收授权码 url: http://localhost:8008/oauth/authorize?client_id=oauth2&response_type=token&scope=all&redirect_uri=http://www.baidu.com 请求结果:https://www.baidu.com/#access_token=5301ece8-e22d-485d-9f44-07f9722a5933&token_type=bearer&expires_in=6974 三、密码模式 获取令牌(post): 说明: 会把密码泄露给客户端, 要求客户端必须是我们自己开发的 url: uaa/oauth/token?client_id=client&client_secret=secret&grant_type=password&username=zhangsan&password=123 四、客户端模式 获取令牌(post): 说明: client_credentials表示客户端模式,没有刷新令牌。当我们对客户端完全信任的情景下使用 url: /oauth/token?client_id=oauth2&client_secret=secret&grant_type=client_credentials
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。