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 = [ ] ;
@@ -185,6 +186,7 @@ function initOAuth(opts) {
185186 popupMask = ( o . popupMask || $ ( '#api-common-mask' ) ) ;
186187 popupDialog = ( o . popupDialog || $ ( '.api-popup-dialog' ) ) ;
187188 clientId = ( o . clientId || errors . push ( 'missing client id' ) ) ;
189+ clientSecret = ( o . clientSecret || errors . push ( 'missing client secret' ) ) ;
188190 realm = ( o . realm || errors . push ( 'missing realm' ) ) ;
189191
190192 if ( errors . length > 0 ) {
@@ -207,6 +209,7 @@ function initOAuth(opts) {
207209window . processOAuthCode = function processOAuthCode ( data ) {
208210 var params = {
209211 'client_id' : clientId ,
212+ 'client_secret' : clientSecret ,
210213 'code' : data . code ,
211214 'grant_type' : 'authorization_code' ,
212215 'redirect_uri' : redirect_uri
Original file line number Diff line number Diff line change 4747 if ( typeof initOAuth == "function" ) {
4848 initOAuth ( {
4949 clientId : "your-client-id" ,
50+ clientSecret : "your-client-secret" ,
5051 realm : "your-realms" ,
5152 appName : "your-app-name"
5253 } ) ;
You can’t perform that action at this time.
0 commit comments