Skip to content

Commit

Permalink
Suppression de messages de debug
Browse files Browse the repository at this point in the history
Pierre Granger committed Feb 26, 2021
1 parent 1272b32 commit 2374093
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 2 additions & 8 deletions examples/sso.php
Original file line number Diff line number Diff line change
@@ -6,10 +6,6 @@

require __DIR__."/requires.inc.php" ;

echo '<pre>' ;

print_r($_SESSION) ;

if ( isset($_GET['logout']) ) unset($_SESSION['ssoToken']) ;

// Create the client
@@ -50,13 +46,11 @@

echo '<hr />' ;

print_r($client->config('accessTokens')) ;

try {
// Now you can call SSO only methods:
echo '<h1>getUserProfile</h1>' ;
$profile = $client->getUserProfile();
var_dump($profile);
echo '<pre>'.print_r($profile,true ).'</pre>' ;
} catch ( \Exception $e ) {
echo '<pre>' ;
echo $e->getMessage() ;
@@ -67,7 +61,7 @@
$id = 5679881 ;
echo '<h1>getUserPermissionOnObject([id => '.$id.'])</h1>' ;
$permissions = $client->getUserPermissionOnObject(['id' => $id]);
var_dump($permissions);
echo '<pre>'.print_r($permissions,true ).'</pre>' ;
} catch ( \Exception $e ) {
echo '<pre>' ;
echo $e->getMessage() ;
2 changes: 0 additions & 2 deletions src/Sitra/ApiClient/ApidaeSerializer.php
Original file line number Diff line number Diff line change
@@ -131,9 +131,7 @@ protected function prepareRequest(CommandInterface $command, RequestInterface $r
}
elseif ( $scope && $scope == AuthenticationSubscriber::SSO_SCOPE )
{
echo __METHOD__.':'.__LINE__.':'.$operation->getName()."\n" ;
$token = $this->clientApi->getAccessToken($scope) ;
echo __METHOD__.':'.__LINE__ ;
$request = $request->withHeader(
'Authorization',
'Bearer ' . $this->clientApi->getAccessToken($scope)

0 comments on commit 2374093

Please sign in to comment.