TODO: lire les documentation officielles provenant des 4 plate-formes tranquillement afin de ccomprendre commet doit on tester ces type d'auth quitte a créé un sous domaine particulier directement hebergé sur gittea
-->Sécuriser le serveur de dev
... | ... |
@@ -5,28 +5,28 @@ |
5 | 5 |
*/ |
6 | 6 |
$config = [ |
7 | 7 |
//Location where to redirect users once they authenticate with a provider |
8 |
- 'callback' => \MVC\Url::link_rewrite(false, 'accueil', []), |
|
8 |
+ 'callback' => 'http://localhost:8080/' . \MVC\Classe\Url::link_rewrite(false, 'compte', []), |
|
9 | 9 |
|
10 | 10 |
//Providers specifics |
11 | 11 |
'providers' => [ |
12 | 12 |
'GitHub' => [ |
13 | 13 |
'enabled' => true, |
14 |
- 'keys' => ['id' => '', 'secret' => ''], |
|
14 |
+ 'keys' => ['id' => '4cc55bcafbf8ea77ae14', 'secret' => 'e0b7c5091d7af4f4e5ced843f2e8ce1f38f02578'], |
|
15 | 15 |
], |
16 | 16 |
|
17 | 17 |
'Google' => [ |
18 | 18 |
'enabled' => true, |
19 |
- 'keys' => ['id' => '', 'secret' => ''], |
|
19 |
+ 'keys' => ['id' => '686670374445-mhktaj9gp08p6oiu8e1aue3ckua6e3s3.apps.googleusercontent.com', 'secret' => '4yOeNxYuYE4H8DFhVzQlOb_U'], |
|
20 | 20 |
], |
21 | 21 |
|
22 | 22 |
'Facebook' => [ |
23 | 23 |
'enabled' => true, |
24 |
- 'keys' => ['id' => '', 'secret' => ''], |
|
24 |
+ 'keys' => ['id' => '432266300978748', 'secret' => '43815184db62771fce19b64cdd80110a'], |
|
25 | 25 |
], |
26 | 26 |
|
27 | 27 |
'Twitter' => [ |
28 | 28 |
'enabled' => true, |
29 |
- 'keys' => ['key' => '', 'secret' => ''], |
|
29 |
+ 'keys' => ['key' => '155718820-WdUWfYpQA4AIa57Cayt3sIXiR90mre31h5S9gUvj', 'secret' => 'nc1w9VLRmnXVl4GkqC8vvUFORzPIdWBz2PE9B5eAF8Idv'], |
|
30 | 30 |
] |
31 | 31 |
], |
32 | 32 |
//optional : set debug mode |
TODO: aller chercher les token et les id des authentifcation pour google, github, facebook, twitter ... Reste a tester et à décider pour les autres types d'authentification.
Emmanuel ROY authored on 26/09/2019 04:27:051 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,50 @@ |
1 |
+<?php |
|
2 |
+/** |
|
3 |
+ * Build a configuration array to pass to `Hybridauth\Hybridauth` |
|
4 |
+ * |
|
5 |
+ */ |
|
6 |
+$config = [ |
|
7 |
+//Location where to redirect users once they authenticate with a provider |
|
8 |
+ 'callback' => \MVC\Url::link_rewrite(false, 'accueil', []), |
|
9 |
+ |
|
10 |
+//Providers specifics |
|
11 |
+ 'providers' => [ |
|
12 |
+ 'GitHub' => [ |
|
13 |
+ 'enabled' => true, |
|
14 |
+ 'keys' => ['id' => '', 'secret' => ''], |
|
15 |
+ ], |
|
16 |
+ |
|
17 |
+ 'Google' => [ |
|
18 |
+ 'enabled' => true, |
|
19 |
+ 'keys' => ['id' => '', 'secret' => ''], |
|
20 |
+ ], |
|
21 |
+ |
|
22 |
+ 'Facebook' => [ |
|
23 |
+ 'enabled' => true, |
|
24 |
+ 'keys' => ['id' => '', 'secret' => ''], |
|
25 |
+ ], |
|
26 |
+ |
|
27 |
+ 'Twitter' => [ |
|
28 |
+ 'enabled' => true, |
|
29 |
+ 'keys' => ['key' => '', 'secret' => ''], |
|
30 |
+ ] |
|
31 |
+ ], |
|
32 |
+ //optional : set debug mode |
|
33 |
+ 'debug_mode' => true, |
|
34 |
+ // Path to file writeable by the web server. Required if 'debug_mode' is not false |
|
35 |
+ 'debug_file' => LOG_PATH . DIRECTORY_SEPARATOR . 'hybridauth.log', |
|
36 |
+ |
|
37 |
+ /* optional : customize Curl settings |
|
38 |
+ // for more information on curl, refer to: http://www.php.net/manual/fr/function.curl-setopt.php |
|
39 |
+ 'curl_options' => [ |
|
40 |
+ // setting custom certificates |
|
41 |
+ CURLOPT_SSL_VERIFYPEER => true, |
|
42 |
+ CURLOPT_CAINFO => '/path/to/your/certificate.crt', |
|
43 |
+ |
|
44 |
+ // set a valid proxy ip address |
|
45 |
+ CURLOPT_PROXY => '*.*.*.*:*', |
|
46 |
+ |
|
47 |
+ // set a custom user agent |
|
48 |
+ CURLOPT_USERAGENT => '' |
|
49 |
+ ] */ |
|
50 |
+]; |