2014-02-25 54 views
1

如何更改Spring Security Oauth2插件的Sparklr/Tonr example(https://github.com/spring-projects/spring-security-oauth)以打開一個彈出窗口詢問用戶的權限,而不是將他重定向到另一個頁面?Spring Security Oauth2 Authorizarion Popup

回答

1

這很簡單。你只需要這樣一個簡短的JS

window.open("http://localhost:8080/sparklr2/oauth/authorize?type=code&client_id=....."); 

並依賴於結果,你應該通知父窗口做一些事情。如:刷新這樣

window.opener.location.reload(false); 

這應該既implicitauthorization_code補助工作。

相關問題