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;
5
5
var realm ;
6
6
var oauth2KeyName ;
7
7
var redirect_uri ;
8
+ var clientSecret ;
8
9
9
10
function handleLogin ( ) {
10
11
var scopes = [ ] ;
@@ -184,6 +185,7 @@ function initOAuth(opts) {
184
185
popupMask = ( o . popupMask || $ ( '#api-common-mask' ) ) ;
185
186
popupDialog = ( o . popupDialog || $ ( '.api-popup-dialog' ) ) ;
186
187
clientId = ( o . clientId || errors . push ( 'missing client id' ) ) ;
188
+ clientSecret = ( o . clientSecret || errors . push ( 'missing client secret' ) ) ;
187
189
realm = ( o . realm || errors . push ( 'missing realm' ) ) ;
188
190
189
191
if ( errors . length > 0 ) {
@@ -206,6 +208,7 @@ function initOAuth(opts) {
206
208
window . processOAuthCode = function processOAuthCode ( data ) {
207
209
var params = {
208
210
'client_id' : clientId ,
211
+ 'client_secret' : clientSecret ,
209
212
'code' : data . code ,
210
213
'grant_type' : 'authorization_code' ,
211
214
'redirect_uri' : redirect_uri
Original file line number Diff line number Diff line change 37
37
if ( typeof initOAuth == "function" ) {
38
38
initOAuth ( {
39
39
clientId : "your-client-id" ,
40
+ clientSecret : "your-client-secret" ,
40
41
realm : "your-realms" ,
41
42
appName : "your-app-name"
42
43
} ) ;
You can’t perform that action at this time.
0 commit comments