File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ var clientId;
55var realm ;
66var oauth2KeyName ;
77var redirect_uri ;
8+ var clientSecret ;
89
910function handleLogin ( ) {
1011 var scopes = [ ] ;
@@ -184,6 +185,7 @@ function initOAuth(opts) {
184185 popupMask = ( o . popupMask || $ ( '#api-common-mask' ) ) ;
185186 popupDialog = ( o . popupDialog || $ ( '.api-popup-dialog' ) ) ;
186187 clientId = ( o . clientId || errors . push ( 'missing client id' ) ) ;
188+ clientSecret = ( o . clientSecret || errors . push ( 'missing client secret' ) ) ;
187189 realm = ( o . realm || errors . push ( 'missing realm' ) ) ;
188190
189191 if ( errors . length > 0 ) {
@@ -206,6 +208,7 @@ function initOAuth(opts) {
206208window . processOAuthCode = function processOAuthCode ( data ) {
207209 var params = {
208210 'client_id' : clientId ,
211+ 'client_secret' : clientSecret ,
209212 'code' : data . code ,
210213 'grant_type' : 'authorization_code' ,
211214 'redirect_uri' : redirect_uri
Original file line number Diff line number Diff line change 3737 if ( typeof initOAuth == "function" ) {
3838 initOAuth ( {
3939 clientId : "your-client-id" ,
40+ clientSecret : "your-client-secret" ,
4041 realm : "your-realms" ,
4142 appName : "your-app-name"
4243 } ) ;
You can’t perform that action at this time.
0 commit comments