39 'OAUTH_AMAZON_SECRET',
42 'OAUTH_BITBUCKET_NAME',
44 'OAUTH_BITBUCKET_SECRET',
52 'OAUTH_BITRIX24_NAME',
54 'OAUTH_BITRIX24_SECRET',
64 'OAUTH_BUFFER_SECRET',
67 'OAUTH_DAILYMOTION_NAME',
68 'OAUTH_DAILYMOTION_ID',
69 'OAUTH_DAILYMOTION_SECRET',
72 'OAUTH_DEVIANTART_NAME',
73 'OAUTH_DEVIANTART_ID',
74 'OAUTH_DEVIANTART_SECRET',
79 'OAUTH_DROPBOX_SECRET',
87 'OAUTH_EVEONLINE_NAME',
89 'OAUTH_EVEONLINE_SECRET',
92 'OAUTH_FACEBOOK_NAME',
94 'OAUTH_FACEBOOK_SECRET',
99 'OAUTH_FITBIT_SECRET',
102 'OAUTH_FIVEHUNDREDPX_NAME',
103 'OAUTH_FIVEHUNDREDPX_ID',
104 'OAUTH_FIVEHUNDREDPX_SECRET',
109 'OAUTH_FLICKR_SECRET',
112 'OAUTH_FOURSQUARE_NAME',
113 'OAUTH_FOURSQUARE_ID',
114 'OAUTH_FOURSQUARE_SECRET',
119 'OAUTH_GITHUB_SECRET',
125 'OAUTH_GOOGLE_SECRET',
131 'OAUTH_HUBIC_SECRET',
134 'OAUTH_INSTAGRAM_NAME',
135 'OAUTH_INSTAGRAM_ID',
136 'OAUTH_INSTAGRAM_SECRET',
139 'OAUTH_LINKEDIN_NAME',
141 'OAUTH_LINKEDIN_SECRET',
144 'OAUTH_MAILCHIMP_NAME',
145 'OAUTH_MAILCHIMP_ID',
146 'OAUTH_MAILCHIMP_SECRET',
149 'OAUTH_MICROSOFT_NAME',
150 'OAUTH_MICROSOFT_ID',
151 'OAUTH_MICROSOFT_SECRET',
154 'OAUTH_MICROSOFT2_NAME',
155 'OAUTH_MICROSOFT2_ID',
156 'OAUTH_MICROSOFT2_SECRET',
164 'OAUTH_NETATMO_NAME',
166 'OAUTH_NETATMO_SECRET',
169 'OAUTH_PARROTFLOWERPOWER_NAME',
170 'OAUTH_PARROTFLOWERPOWER_ID',
171 'OAUTH_PARROTFLOWERPOWER_SECRET',
176 'OAUTH_PAYPAL_SECRET',
181 'OAUTH_POCKET_SECRET',
184 'OAUTH_QUICKBOOKS_NAME',
185 'OAUTH_QUICKBOOKS_ID',
186 'OAUTH_QUICKBOOKS_SECRET',
191 'OAUTH_REDDIT_SECRET',
194 'OAUTH_REDMINE_NAME',
196 'OAUTH_REDMINE_SECRET',
199 'OAUTH_RUNKEEPER_NAME',
200 'OAUTH_RUNKEEPER_ID',
201 'OAUTH_RUNKEEPER_SECRET',
204 'OAUTH_SCOOPIT_NAME',
206 'OAUTH_SCOOPIT_SECRET',
209 'OAUTH_SOUNDCLOUD_NAME',
210 'OAUTH_SOUNDCLOUD_ID',
211 'OAUTH_SOUNDCLOUD_SECRET',
214 'OAUTH_SPOTIFY_NAME',
216 'OAUTH_SPOTIFY_SECRET',
221 'OAUTH_STRAVA_SECRET',
224 'OAUTH_STRIPETEST_NAME',
225 'OAUTH_STRIPETEST_ID',
226 'OAUTH_STRIPETEST_SECRET_KEY',
229 'OAUTH_STRIPELIVE_NAME',
230 'OAUTH_STRIPELIVE_ID',
231 'OAUTH_STRIPELIVE_SECRET_KEY',
236 'OAUTH_TUMBLR_SECRET',
239 'OAUTH_TWITTER_NAME',
241 'OAUTH_TWITTER_SECRET',
244 'OAUTH_USTREAM_NAME',
246 'OAUTH_USTREAM_SECRET',
251 'OAUTH_VIMEO_SECRET',
256 'OAUTH_YAHOO_SECRET',
261 'OAUTH_YAMMER_SECRET',
264 'OAUTH_GENERIC_NAME',
266 'OAUTH_GENERIC_SECRET',
282 $supportedoauth2array = array(
283 'OAUTH_GOOGLE_NAME' => array(
284 'callbackfile' =>
'google',
286 'urlforapp' =>
'OAUTH_GOOGLE_DESC',
288 'urlforcredentials' =>
'https://console.developers.google.com/',
289 'availablescopes' =>
'userinfo_email,userinfo_profile,openid,email,profile,cloud_print,admin_directory_user,gmail_full,contact,https://www.googleapis.com/auth/contacts,https://www.googleapis.com/auth/calendar',
290 'returnurl' =>
'/core/modules/oauth/google_oauthcallback.php'
293 if (isModEnabled(
'stripe')) {
294 $supportedoauth2array[
'OAUTH_STRIPETEST_NAME'] = array(
295 'callbackfile' =>
'stripetest',
298 'name' =>
'StripeTest',
299 'urlforcredentials' =>
'https://dashboard.stripe.com/settings/connect',
300 'availablescopes' =>
'read_write',
301 'returnurl' =>
'/core/modules/oauth/stripetest_oauthcallback.php'
303 $supportedoauth2array[
'OAUTH_STRIPELIVE_NAME'] = array(
304 'callbackfile' =>
'stripelive',
307 'name' =>
'StripeLive',
308 'urlforcredentials' =>
'https://dashboard.stripe.com/settings/connect',
309 'availablescopes' =>
'read_write',
310 'returnurl' =>
'/core/modules/oauth/stripelive_oauthcallback.php'
313 $supportedoauth2array[
'OAUTH_GITHUB_NAME'] = array(
314 'callbackfile' =>
'github',
316 'urlforapp' =>
'OAUTH_GITHUB_DESC',
318 'urlforcredentials' =>
'https://github.com/settings/developers',
319 'availablescopes' =>
'user,public_repo',
320 'returnurl' =>
'/core/modules/oauth/github_oauthcallback.php'
323 $supportedoauth2array[
'OAUTH_MICROSOFT_NAME'] = array(
324 'callbackfile' =>
'microsoft',
325 'picto' =>
'microsoft',
326 'urlforapp' =>
'OAUTH_MICROSOFT_DESC',
327 'name' =>
'Microsoft [outlook.office365]',
328 'urlforcredentials' =>
'https://portal.azure.com/',
330 'availablescopes' =>
'openid,offline_access,profile,email,User.Read,https://outlook.office365.com/IMAP.AccessAsUser.All,https://outlook.office365.com/SMTP.Send',
331 'returnurl' =>
'/core/modules/oauth/microsoft_oauthcallback.php'
333 $supportedoauth2array[
'OAUTH_MICROSOFT2_NAME'] = array(
334 'callbackfile' =>
'microsoft2',
335 'picto' =>
'microsoft',
336 'urlforapp' =>
'OAUTH_MICROSOFT2_DESC',
337 'name' =>
'Microsoft [outlook.office]',
338 'urlforcredentials' =>
'https://portal.azure.com/',
340 'availablescopes' =>
'openid,offline_access,profile,email,User.Read,https://outlook.office.com/.default',
341 'returnurl' =>
'/core/modules/oauth/microsoft2_oauthcallback.php'
344 $supportedoauth2array[
'OAUTH_GENERIC_NAME'] = array(
345 'callbackfile' =>
'generic',
346 'picto' =>
'generic',
347 'urlforapp' =>
'OAUTH_GENERIC_DESC',
349 'urlforcredentials' =>
'',
350 'availablescopes' =>
'Standard',
351 'returnurl' =>
'/core/modules/oauth/generic_oauthcallback.php'
355 return $supportedoauth2array;
366 global $langs, $conf;
371 $head[$h][1] = $langs->trans(
"OAuthServices");
372 $head[$h][2] =
'services';
375 $head[$h][0] =
dol_buildpath(
'/admin/oauthlogintokens.php', 1);
376 $head[$h][1] = $langs->trans(
"TokenManager");
377 $head[$h][2] =
'tokengeneration';
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).
getAllOauth2Array()
Return array of possible OAUTH2 services.
getSupportedOauth2Array()
Return array of tabs to used on pages to setup cron module.
oauthadmin_prepare_head()
Return array of tabs to used on pages to setup cron module.