Skip to content

Commit 8cad7fe

Browse files
committed
Merged the latest changes
2 parents cb71d11 + 2d80048 commit 8cad7fe

File tree

541 files changed

+179728
-173397
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

541 files changed

+179728
-173397
lines changed

cfg/const.inc.php

Lines changed: 1217 additions & 990 deletions
Large diffs are not rendered by default.
Lines changed: 57 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,57 @@
1-
<?php
2-
//
3-
// filesource oauth.azuread.inc.php
4-
//
5-
// Azure AD
6-
// Fill in CLIENT_ID,
7-
// CLIENT_SECRET,
8-
// YOURTESTLINKSERVER,
9-
// TENANTID
10-
// with your information
11-
// See this article for registering an application: https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-protocols-oauth-code
12-
// Make sure, you grant admint consent for it: https://docs.microsoft.com/en-us/azure/active-directory/manage-apps/configure-user-consent
13-
14-
//
15-
// IMPORTANTE NOTICE
16-
// key in $tlCfg->OAuthServers[]
17-
// can be anything you want that make this configuration
18-
// does not overwrite other or will be overwritten
19-
//
20-
// HOW TO use this file ?
21-
// 1. copy this file to
22-
// [TESTLINK_INSTALL]/cfg/
23-
//
24-
// 2. configure according your application
25-
//
26-
// 3. add the following line to your custom_config.inc.php
27-
// require('aouth.azuread.inc.php');
28-
//
29-
// -------------------------------------------------------------
30-
$tlCfg->OAuthServers['azuread'] = array();
31-
32-
$tlCfg->OAuthServers['azuread']['redirect_uri'] = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . '/login.php';
33-
34-
35-
$tlCfg->OAuthServers['azuread']['oauth_client_id'] = 'CHANGE_WITH_CLIENT_ID';
36-
$tlCfg->OAuthServers['azuread']['oauth_client_secret'] =
37-
'CHANGE_WITH_CLIENT_SECRET';
38-
39-
// https://login.microsoftonline.com/YOUR_TENANT_ID/v2.0/.well-known/openid-configuration
40-
$azureADBaseURL = 'https://login.microsoftonline.com/CHANGE_WITH_TENANT_ID';
41-
$msGraphURL = 'https://graph.microsoft.com';
42-
$tlCfg->OAuthServers['azuread']['oauth_url'] =
43-
$azureADBaseURL . '/oauth2/v2.0/authorize';
44-
45-
$tlCfg->OAuthServers['azuread']['token_url'] =
46-
$azureADBaseURL . '/oauth2/v2.0/token';
47-
48-
$tlCfg->OAuthServers['azuread']['oauth_profile'] =
49-
$msGraphURL . '/oidc/userinfo';
50-
51-
52-
$tlCfg->OAuthServers['azuread']['oauth_enabled'] = true;
53-
$tlCfg->OAuthServers['azuread']['oauth_name'] = 'azuread'; //do not change this
54-
$tlCfg->OAuthServers['azuread']['oauth_force_single'] = true;
55-
$tlCfg->OAuthServers['azuread']['oauth_grant_type'] = 'authorization_code';
56-
57-
// the domain you want to whitelist (email domains)
58-
$tlCfg->OAuthServers['azuread']['oauth_domain'] = 'autsoft.hu';
59-
60-
61-
$tlCfg->OAuthServers['azuread']['oauth_scope'] =
62-
'https://graph.microsoft.com/mail.read https://graph.microsoft.com/user.read openid profile email';
1+
<?php
2+
//
3+
// filesource oauth.azuread.inc.php
4+
//
5+
// Azure AD
6+
// Fill in CLIENT_ID,
7+
// CLIENT_SECRET,
8+
// YOURTESTLINKSERVER,
9+
// TENANTID
10+
// with your information
11+
// See this article for registering an application: https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-protocols-oauth-code
12+
// Make sure, you grant admint consent for it: https://docs.microsoft.com/en-us/azure/active-directory/manage-apps/configure-user-consent
13+
14+
//
15+
// IMPORTANTE NOTICE
16+
// key in $tlCfg->OAuthServers[]
17+
// can be anything you want that make this configuration
18+
// does not overwrite other or will be overwritten
19+
//
20+
// HOW TO use this file ?
21+
// 1. copy this file to
22+
// [TESTLINK_INSTALL]/cfg/
23+
//
24+
// 2. configure according your application
25+
//
26+
// 3. add the following line to your custom_config.inc.php
27+
// require('aouth.azuread.inc.php');
28+
//
29+
// -------------------------------------------------------------
30+
$tlCfg->OAuthServers['azuread'] = [];
31+
32+
$tlCfg->OAuthServers['azuread']['redirect_uri'] = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') .
33+
$_SERVER['HTTP_HOST'] . '/login.php';
34+
35+
$tlCfg->OAuthServers['azuread']['oauth_client_id'] = 'CHANGE_WITH_CLIENT_ID';
36+
$tlCfg->OAuthServers['azuread']['oauth_client_secret'] = 'CHANGE_WITH_CLIENT_SECRET';
37+
38+
// https://login.microsoftonline.com/YOUR_TENANT_ID/v2.0/.well-known/openid-configuration
39+
$azureADBaseURL = 'https://login.microsoftonline.com/CHANGE_WITH_TENANT_ID';
40+
$msGraphURL = 'https://graph.microsoft.com';
41+
$tlCfg->OAuthServers['azuread']['oauth_url'] = $azureADBaseURL .
42+
'/oauth2/v2.0/authorize';
43+
44+
$tlCfg->OAuthServers['azuread']['token_url'] = $azureADBaseURL .
45+
'/oauth2/v2.0/token';
46+
47+
$tlCfg->OAuthServers['azuread']['oauth_profile'] = $msGraphURL . '/oidc/userinfo';
48+
49+
$tlCfg->OAuthServers['azuread']['oauth_enabled'] = true;
50+
$tlCfg->OAuthServers['azuread']['oauth_name'] = 'azuread'; // do not change this
51+
$tlCfg->OAuthServers['azuread']['oauth_force_single'] = true;
52+
$tlCfg->OAuthServers['azuread']['oauth_grant_type'] = 'authorization_code';
53+
54+
// the domain you want to whitelist (email domains)
55+
$tlCfg->OAuthServers['azuread']['oauth_domain'] = 'autsoft.hu';
56+
57+
$tlCfg->OAuthServers['azuread']['oauth_scope'] = 'https://graph.microsoft.com/mail.read https://graph.microsoft.com/user.read openid profile email';
Lines changed: 43 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,44 @@
1-
<?php
2-
#
3-
# @filename oauth.github.inc.php
4-
#
5-
# 20200522 - tested OK
6-
# Application is registered for github user testlinkOAuth
7-
# this user is owned by TestLink Development Team.
8-
#
9-
#
10-
# Client implemented using
11-
# https://github.com/thephpleague/oauth2-github
12-
#
13-
#
14-
# IMPORTANT NOTICE
15-
# key in $tlCfg->OAuthServers[]
16-
# can be anything you want that make this configuration
17-
# does not overwrite other or will be overwritten
18-
#
19-
# HOW TO use this file ?
20-
# 1. copy this file to
21-
# [TESTLINK_INSTALL]/cfg/
22-
#
23-
# 2. configure according your application
24-
#
25-
# 3. add the following line to your custom_config.inc.php
26-
# require('aouth.github.inc.php');
27-
#
28-
# ###########################################################
29-
# This is a working example for test site
30-
# http://fman.hopto.org/
31-
#
32-
# You need to create the configuration for your site
33-
# This is only a working example that is useful
34-
# for the TestLink Development Team
35-
#
36-
$tlCfg->OAuthServers['github'] = array();
37-
$tlCfg->OAuthServers['github']['redirect_uri'] =
38-
'http://fman.hopto.org/login.php?oauth=github';
39-
40-
$tlCfg->OAuthServers['github']['oauth_client_id'] ='aa5f70a8de342fb95043';
41-
$tlCfg->OAuthServers['github']['oauth_client_secret'] =
42-
'c8d61d5ec4ed4eb2ac81064c27043ddef351107e';
43-
44-
$tlCfg->OAuthServers['github']['oauth_enabled'] = true;
1+
<?php
2+
#
3+
# @filename oauth.github.inc.php
4+
#
5+
# 20200522 - tested OK
6+
# Application is registered for github user testlinkOAuth
7+
# this user is owned by TestLink Development Team.
8+
#
9+
#
10+
# Client implemented using
11+
# https://github.com/thephpleague/oauth2-github
12+
#
13+
#
14+
# IMPORTANT NOTICE
15+
# key in $tlCfg->OAuthServers[]
16+
# can be anything you want that make this configuration
17+
# does not overwrite other or will be overwritten
18+
#
19+
# HOW TO use this file ?
20+
# 1. copy this file to
21+
# [TESTLINK_INSTALL]/cfg/
22+
#
23+
# 2. configure according your application
24+
#
25+
# 3. add the following line to your custom_config.inc.php
26+
# require('aouth.github.inc.php');
27+
#
28+
# ###########################################################
29+
# This is a working example for test site
30+
# http://fman.hopto.org/
31+
#
32+
# You need to create the configuration for your site
33+
# This is only a working example that is useful
34+
# for the TestLink Development Team
35+
#
36+
$tlCfg->OAuthServers['github'] = [];
37+
$tlCfg->OAuthServers['github']['redirect_uri'] = 'http://fman.hopto.org/login.php?oauth=github';
38+
39+
$tlCfg->OAuthServers['github']['oauth_client_id'] = 'aa5f70a8de342fb95043';
40+
$tlCfg->OAuthServers['github']['oauth_client_secret'] = 'c8d61d5ec4ed4eb2ac81064c27043ddef351107e';
41+
42+
$tlCfg->OAuthServers['github']['oauth_enabled'] = true;
4543
$tlCfg->OAuthServers['github']['oauth_name'] = 'github';
46-
# End Of File
44+
Lines changed: 43 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,44 @@
1-
<?php
2-
# filesource oauth.gitlab.inc.php
3-
#
4-
# Some useful examples/documentation
5-
# https://docs.gitlab.com/ce/api/oauth2.html
6-
# https://grafana.com/docs/grafana/latest/auth/gitlab/
7-
8-
# Libraries used to create client
9-
# https://github.com/thephpleague/oauth2-client
10-
# https://github.com/omines/oauth2-gitlab
11-
#
12-
# IMPORTANT NOTICE
13-
# key in $tlCfg->OAuthServers[]
14-
# can be anything you want that make this configuration
15-
# does not overwrite other or will be overwritten
16-
#
17-
# HOW TO use this file ?
18-
# 1. copy this file to
19-
# [TESTLINK_INSTALL]/cfg/
20-
#
21-
# 2. configure according your application
22-
#
23-
# 3. add the following line to your custom_config.inc.php
24-
# require('aouth.gitlab.inc.php');
25-
#
26-
# ##############################################################
27-
#
28-
# This is a working example for test site
29-
# http://fman.hopto.org/
30-
#
31-
# You need to create the configuration for your site
32-
# This is only a working example that is useful
33-
# for the TestLink Development Team
34-
#
35-
$tlCfg->OAuthServers['gitlab'] = array();
36-
37-
$tlCfg->OAuthServers['gitlab']['redirect_uri'] =
38-
'http://fman.hopto.org/login.php?oauth=gitlab';
39-
40-
$tlCfg->OAuthServers['gitlab']['oauth_enabled'] = true;
41-
$tlCfg->OAuthServers['gitlab']['oauth_name'] = 'gitlab';
42-
43-
$tlCfg->OAuthServers['gitlab']['oauth_client_id'] =
44-
'27a03c93d60b5ddb4e0cef92149678fbe37c099733605e046a5428a9da4177ba';
45-
1+
<?php
2+
# filesource oauth.gitlab.inc.php
3+
#
4+
# Some useful examples/documentation
5+
# https://docs.gitlab.com/ce/api/oauth2.html
6+
# https://grafana.com/docs/grafana/latest/auth/gitlab/
7+
8+
# Libraries used to create client
9+
# https://github.com/thephpleague/oauth2-client
10+
# https://github.com/omines/oauth2-gitlab
11+
#
12+
# IMPORTANT NOTICE
13+
# key in $tlCfg->OAuthServers[]
14+
# can be anything you want that make this configuration
15+
# does not overwrite other or will be overwritten
16+
#
17+
# HOW TO use this file ?
18+
# 1. copy this file to
19+
# [TESTLINK_INSTALL]/cfg/
20+
#
21+
# 2. configure according your application
22+
#
23+
# 3. add the following line to your custom_config.inc.php
24+
# require('aouth.gitlab.inc.php');
25+
#
26+
# ##############################################################
27+
#
28+
# This is a working example for test site
29+
# http://fman.hopto.org/
30+
#
31+
# You need to create the configuration for your site
32+
# This is only a working example that is useful
33+
# for the TestLink Development Team
34+
#
35+
$tlCfg->OAuthServers['gitlab'] = [];
36+
37+
$tlCfg->OAuthServers['gitlab']['redirect_uri'] = 'http://fman.hopto.org/login.php?oauth=gitlab';
38+
39+
$tlCfg->OAuthServers['gitlab']['oauth_enabled'] = true;
40+
$tlCfg->OAuthServers['gitlab']['oauth_name'] = 'gitlab';
41+
42+
$tlCfg->OAuthServers['gitlab']['oauth_client_id'] = '27a03c93d60b5ddb4e0cef92149678fbe37c099733605e046a5428a9da4177ba';
43+
4644
$tlCfg->OAuthServers['gitlab']['oauth_client_secret'] = 'c157df291b81dbfd8084d38b155029baded3cf76c7449670bd2da889fe8b99eb';
Lines changed: 41 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,52 @@
1-
<?php
2-
# filesource oauth.google.inc.php
3-
#
4-
# IMPORTANT NOTICE
5-
# key in $tlCfg->OAuthServers[]
6-
# can be anything you want that make this configuration
7-
# does not overwrite other or will be overwritten
8-
#
9-
# HOW TO use this file ?
10-
# 1. copy this file to
11-
# [TESTLINK_INSTALL]/cfg/
12-
#
13-
# 2. configure according your application
14-
#
15-
# 3. add the following line to your custom_config.inc.php
16-
# require('aouth.google.inc.php');
17-
#
18-
# #############################################################
19-
# Client implemented using
20-
# https://github.com/thephpleague/oauth2-google
21-
##
22-
# This is a working example for test site
23-
# http://fman.hopto.org/
24-
#
25-
# You need to create the configuration for your site
26-
# This is only a working example that is useful
27-
# for the TestLink Development Team
28-
#
29-
$tlCfg->OAuthServers['google'] = array();
30-
$tlCfg->OAuthServers['google']['redirect_uri'] =
31-
'http://fman.hopto.org/login.php?oauth=google';
32-
33-
$tlCfg->OAuthServers['google']['oauth_enabled'] = true;
34-
$tlCfg->OAuthServers['google']['oauth_name'] = 'google';
35-
36-
// Get from /gui/themes/default/images
37-
$tlCfg->OAuthServers['google']['oauth_client_id'] =
38-
'860603525614-fscj9cgr2dvks51uh6odl67skec536fd.apps.googleusercontent.com';
39-
40-
$tlCfg->OAuthServers['google']['oauth_client_secret'] =
41-
'_YOKquNTa4Fux-OMJoxDBuov';
1+
<?php
2+
# filesource oauth.google.inc.php
3+
#
4+
# IMPORTANT NOTICE
5+
# key in $tlCfg->OAuthServers[]
6+
# can be anything you want that make this configuration
7+
# does not overwrite other or will be overwritten
8+
#
9+
# HOW TO use this file ?
10+
# 1. copy this file to
11+
# [TESTLINK_INSTALL]/cfg/
12+
#
13+
# 2. configure according your application
14+
#
15+
# 3. add the following line to your custom_config.inc.php
16+
# require('aouth.google.inc.php');
17+
#
18+
# #############################################################
19+
# Client implemented using
20+
# https://github.com/thephpleague/oauth2-google
21+
# #
22+
# This is a working example for test site
23+
# http://fman.hopto.org/
24+
#
25+
# You need to create the configuration for your site
26+
# This is only a working example that is useful
27+
# for the TestLink Development Team
28+
#
29+
$tlCfg->OAuthServers['google'] = [];
30+
$tlCfg->OAuthServers['google']['redirect_uri'] = 'http://fman.hopto.org/login.php?oauth=google';
31+
32+
$tlCfg->OAuthServers['google']['oauth_enabled'] = true;
33+
$tlCfg->OAuthServers['google']['oauth_name'] = 'google';
34+
35+
// Get from /gui/themes/default/images
36+
$tlCfg->OAuthServers['google']['oauth_client_id'] = '860603525614-fscj9cgr2dvks51uh6odl67skec536fd.apps.googleusercontent.com';
37+
38+
$tlCfg->OAuthServers['google']['oauth_client_secret'] = '_YOKquNTa4Fux-OMJoxDBuov';
4239

4340
// Needed when you use the cURL implementation
4441
// Can be authorization_code (by default), client_credentials or password
45-
// $tlCfg->OAuthServers['google']['oauth_grant_type'] = 'authorization_code';
42+
// $tlCfg->OAuthServers['google']['oauth_grant_type'] = 'authorization_code';
4643
//$tlCfg->OAuthServers['google']['oauth_url'] = 'https://accounts.google.com/o/oauth2/auth';
4744
//$tlCfg->OAuthServers['google']['token_url'] = 'https://accounts.google.com/o/oauth2/token';
4845

4946
// false => then the only user will be selected automatically (applied for google)
50-
//$tlCfg->OAuthServers['google']['oauth_force_single'] = false;
47+
//$tlCfg->OAuthServers['google']['oauth_force_single'] = false;
5148

5249
// the domain you want to whitelist
53-
//$tlCfg->OAuthServers['google']['oauth_domain'] = 'google.com';
50+
//$tlCfg->OAuthServers['google']['oauth_domain'] = 'google.com';
5451
//$tlCfg->OAuthServers['google']['oauth_profile'] = 'https://www.googleapis.com/oauth2/v1/userinfo';
5552
//$tlCfg->OAuthServers['google']['oauth_scope'] = 'https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile';

0 commit comments

Comments
 (0)