前面三篇文章讲了client credentials、password以及authorization code受权模式,本文就来说一下implicit模式。html
该模式直接在浏览器中向认证服务器申请令牌,无需通过client端的服务器,跳过了"受权码"这个步骤,全部步骤在浏览器中完成,直接在回调url中传递令牌。前端
适合直接在前端应用获取token的应用spring
步骤跟authorization code相似,只不过少了受权码:浏览器
http://localhost:8080/oauth/authorize?response_type=token&client_id=demoApp&redirect_uri=https://baidu.com
http://localhost:8081/callback#access_token=41f78007-e2ec-4978-9beb-a830b638d4d8&token_type=bearer&expires_in=1199&scope=all
能够发现直接在url中携带了access_token等信息服务器
固然了,使用了implicit模式,其实就不必使用spring security oauth2的client模块了,由于直接走浏览器模式。编码