Test sur l'implémentation de hybridAuth -> OK !

TODO: créé les pages de blog (sommaire,news) permettant d'afficher les fichiers md
TODO: créer les commandes complétement
TODO: envoyer les bugs wordpress
TODO: corriger le bug de création de la base de donnée pour prestashop
This commit is contained in:
Emmanuel ROY 2020-03-19 17:12:21 +01:00
parent 42ef646e87
commit 56926af2d9
3 changed files with 13 additions and 5 deletions

View file

@ -5,11 +5,11 @@
require CONFIG_PATH . DIRECTORY_SEPARATOR . "authentification-config-example.php";
//$hybridauth = new Hybridauth\Hybridauth($config);
$hybridauth = \MVC\Classe\Session::getHybridAuth();
//$adapters = $hybridauth->getConnectedAdapters();
$hybridauth = new Hybridauth\Hybridauth($config);
$hybridauth->authenticate(\MVC\Classe\Session::getStorage()->get('provider'));
$adapters = $hybridauth->getConnectedAdapters();
$adapter = $hybridauth->getAdapter(\MVC\Classe\Session::getStorage()->get('provider'));
/*$adapter = $hybridauth->getAdapter(\MVC\Classe\Session::getStorage()->get('provider'));
\MVC\Classe\Dumper::dump($adapter);
@ -22,3 +22,5 @@ $userProfile = $adapter->getUserProfile();
\MVC\Classe\Dumper::dump($userProfile);
$templateData['adapters'] = [\MVC\Classe\Session::getStorage()->get('provider')=>$adapter];
*/
$templateData['adapters'] = $adapters;

View file

@ -4,6 +4,11 @@
@section('sidebar')
This is the master sidebar.
<a href="{{ \MVC\Classe\Url::link_rewrite( false, 'accueil', []) }}">Homepage</a>
<a href="{{ \MVC\Classe\Url::link_rewrite( false, 'prestashop', []) }}">Prestashop</a>
<a href="{{ \MVC\Classe\Url::link_rewrite( false, 'wordpress', []) }}">Wordpress</a>
<a href="{{ \MVC\Classe\Url::link_rewrite( false, 'syf43', []) }}">Symfony 4.3</a>
<a href="{{ \MVC\Classe\Url::link_rewrite( false, 'syf51', []) }}">Symfony 5.0.99</a>
@show
<div class="container">

View file

@ -4,6 +4,7 @@
@parent
<p>This is appended to the master sidebar.</p>
<a href="{{ \MVC\Classe\Url::link_rewrite( false, 'authentification', []) }}">Authentification</a>
@endsection
@section('content')
@ -16,7 +17,7 @@
@foreach ($adapters as $name => $adapter)
<li>
from <i>{{ $name }}</i>
{{ \MVC\Classe\Dumper::dump($adapter) }}
{{ \MVC\Classe\Dumper::dump($adapter->getUserProfile()) }}
<!--<span>(<a href="{{ \MVC\Classe\Url::link_rewrite( true, 'authentification-callback-example', ['logout'=>$name ]) }}"
">Log Out</a>)</span>-->
<span>(<a href="{{ \MVC\Classe\Url::link_rewrite( false, 'logout', ['logout'=>$name ]) }}">Log Out</a>)</span>