- Timestamp:
- 05/31/12 16:52:19 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.4.1-3/phpgwapi/templates/default/login_default.php
r6352 r6367 183 183 $ch = curl_init(); 184 184 185 $restConf = parse_ini_file( __DIR__ . '/../../../prototype/config/REST.ini', true ); 186 185 187 $param = 'grant_type=password'; 186 $param .= '&client_id=' . $ GLOBALS['oauth']['client_id'];187 $param .= '&client_secret=' . $ GLOBALS['oauth']['client_secret'];188 $param .= '&client_id=' . $restConf['oauth']['client_id']; 189 $param .= '&client_secret=' . $restConf['oauth']['client_secret']; 188 190 $param .= '&username=' . $_POST['user']; 189 191 $param .= '&password=' . $_POST['passwd']; 190 192 191 193 // set URL and other appropriate options 192 curl_setopt($ch, CURLOPT_URL, $ GLOBALS['oauth']['url_token']);194 curl_setopt($ch, CURLOPT_URL, $restConf['oauth']['url_token']); 193 195 curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: */*')); 194 196 curl_setopt($ch, CURLOPT_POST, TRUE); … … 210 212 $_SESSION['oauth']['scope'] = $a->scope; 211 213 $_SESSION['oauth']['refresh_token'] = $a->refresh_token; 212 213 214 214 215 }
Note: See TracChangeset
for help on using the changeset viewer.