Skip to content

Commit

Permalink
Merge pull request #821 from PROCERGS/preview-1.19.5
Browse files Browse the repository at this point in the history
Enabling Remote Claims in the production feature-set
  • Loading branch information
guilhermednt authored Dec 11, 2018
2 parents 33d1c3d + 1ce6766 commit 70e83c9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/config/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ security:
ROLE_VIEW_3RD_PARTY_CONNECTIONS:
ROLE_PERSON_BLOCK:
ROLE_EDIT_CLIENT_SUBJECT_TYPE:
FEATURE_ALPHA: FEATURE_BETA, FEATURE_SHOW_PROFILE_VIEWS, FEATURE_REMOTE_CLAIMS
FEATURE_ALPHA: FEATURE_BETA, FEATURE_SHOW_PROFILE_VIEWS
FEATURE_BETA: FEATURE_PROD, FEATURE_ORGANIZATIONS
FEATURE_PROD: FEATURE_2FACTOR_AUTH, FEATURE_INVALIDATE_SESSIONS
FEATURE_PROD: FEATURE_2FACTOR_AUTH, FEATURE_INVALIDATE_SESSIONS, FEATURE_REMOTE_CLAIMS
FEATURE_IGP_VALIDATION:
FEATURE_ORGANIZATIONS:
FEATURE_IMPERSONATION_REPORTS:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function validateRemoteClaimAction(Request $request)
/** @var Authorization|null $authorization */
$authorization = $authorizationManager->getAuthorization($person, $provider);

if ($authorization instanceof Authorization) {
if (!$authorization instanceof Authorization) {
throw $this->createNotFoundException("Authorization not found");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use GuzzleHttp\Client;
use GuzzleHttp\Exception\TransferException;
use LoginCidadao\LogBundle\Traits\LoggerAwareTrait;
use LoginCidadao\OAuthBundle\Entity\ClientRepository;
use LoginCidadao\OAuthBundle\Model\ClientInterface;
use LoginCidadao\OpenIDBundle\Manager\ClientManager;
use LoginCidadao\RemoteClaimsBundle\Entity\RemoteClaim;
Expand All @@ -30,6 +29,7 @@
use LoginCidadao\RemoteClaimsBundle\Parser\RemoteClaimParser;
use LoginCidadao\OAuthBundle\Entity\Client as ClaimProvider;
use LoginCidadao\RemoteClaimsBundle\RemoteClaimEvents;
use Psr\Log\LogLevel;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

Expand Down Expand Up @@ -95,6 +95,7 @@ public function fetchRemoteClaim($claimUri)

return $remoteClaim;
} catch (\Exception $e) {
$this->log(LogLevel::ERROR, "Error fetching remote claim: {$e->getMessage()}");
throw new NotFoundHttpException($e->getMessage(), $e);
}
}
Expand Down

0 comments on commit 70e83c9

Please sign in to comment.