前面三篇文章講了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模塊了,由於直接走瀏覽器模式。編碼