我已經安裝了以下插件Grails的彈簧安全OAuth的谷歌:如何設置
compile 'org.grails.plugins:spring-security-core:3.1.1'
compile "org.grails.plugins:spring-security-oauth2:1.1.0"
compile "org.grails.plugins:spring-security-oauth2-google:1.1.0"
春安芯正常工作。 但我在實施oauth-google身份驗證時遇到問題。
插件文檔說我們需要傳遞api_key和api_secret。我在console.developers.google.com上創建了一個項目,並創建了API Key和Oauth Keys,我對在application.yml中使用哪些值感到困惑。 因爲根據console.developers.google.com API密鑰和Oauth密鑰是不同的憑據。
任何有關從哪裏獲得以及如何設置以下值的建議都將有所幫助。
api_key: 'AIzaSyBjfn345tg6j0ol1e89kHMOY'
api_secret: 'xseettDDNtjjuutrfuAFTe4d'
successUri: "/oauth2/google/success"
failureUri: "/oauth2/google/failure"
callback: "/oauth2/google/callback"
scopes: "some_scope"