File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -142,28 +142,30 @@ function OAuthProvider() {
142142 * Retrieves the `refresh_token` and stores the `response.data` on cookies
143143 * using the `OAuthToken`.
144144 *
145+ * @param {object } data - Request content.
146+ * @param {object } options - Optional configuration.
145147 * @return {promise } A response promise.
146148 */
147149
148- getRefreshToken ( ) {
149- var data = {
150+ getRefreshToken ( data , options ) {
151+ data = angular . extend ( {
150152 client_id : config . clientId ,
151153 grant_type : 'refresh_token' ,
152154 refresh_token : OAuthToken . getRefreshToken ( ) ,
153- } ;
155+ } , data ) ;
154156
155157 if ( null !== config . clientSecret ) {
156158 data . client_secret = config . clientSecret ;
157159 }
158160
159161 data = queryString . stringify ( data ) ;
160162
161- var options = {
163+ options = angular . extend ( {
162164 headers : {
163165 'Authorization' : undefined ,
164166 'Content-Type' : 'application/x-www-form-urlencoded'
165167 }
166- } ;
168+ } , options ) ;
167169
168170 return $http . post ( `${ config . baseUrl } ${ config . grantPath } ` , data , options ) . then ( ( response ) => {
169171 OAuthToken . setToken ( response . data ) ;
You can’t perform that action at this time.
0 commit comments