File tree Expand file tree Collapse file tree 6 files changed +55
-6
lines changed
Expand file tree Collapse file tree 6 files changed +55
-6
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "name" : " simplesamlphp/simplesamlphp-module-adfs" ,
3+ "description" : " A module that implements the WS-federation IDP" ,
4+ "type" : " simplesamlphp-module" ,
5+ "keywords" : [" simplesamlphp" , " adfs" ],
6+ "license" : " LGPL-3.0-or-later" ,
7+ "authors" : [
8+ {
9+ "name" : " Tim van Dijen" ,
10+ "email" : " tvdijen@gmail.com"
11+ }
12+ ],
13+ "config" : {
14+ "preferred-install" : {
15+ "simplesamlphp/simplesamlphp" : " source" ,
16+ "*" : " dist"
17+ }
18+ },
19+ "autoload" : {
20+ "psr-4" : {
21+ "SimpleSAML\\ modules\\ adfs\\ " : " lib/"
22+ }
23+ },
24+ "autoload-dev" : {
25+ "psr-4" : {
26+ "Tests\\ SimpleSAML\\ modules\\ riak\\ TestFiles\\ " : " tests/files" ,
27+ "SimpleSAML\\ Test\\ Utils\\ " : " vendor/simplesamlphp/simplesamlphp/tests/Utils"
28+ }
29+ },
30+ "require" : {
31+ "php" : " >=5.5" ,
32+ "simplesamlphp/composer-module-installer" : " ~1.1" ,
33+ "webmozart/assert" : " ~1.4" ,
34+ },
35+ "require-dev" : {
36+ "simplesamlphp/simplesamlphp" : " ^1.17" ,
37+ "phpunit/phpunit" : " ~4.8.36"
38+ },
39+ "support" : {
40+ "issues" : " https://github.com/tvdijen/simplesamlphp-module-adfs/issues" ,
41+ "source" : " https://github.com/tvdijen/simplesamlphp-module-adfs"
42+ }
43+ }
Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ public static function receiveLogoutMessage(\SimpleSAML\IdP $idp)
338338 // this implies an override to normal sp notification
339339 if (isset ($ _GET ['wreply ' ]) && !empty ($ _GET ['wreply ' ])) {
340340 $ idp ->doLogoutRedirect (\SimpleSAML \Utils \HTTP ::checkURLAllowed ($ _GET ['wreply ' ]));
341- assert ( false );
341+ throw new \ Exception ( " Code should never be reached " );
342342 }
343343
344344 $ state = [
Original file line number Diff line number Diff line change 22
33namespace SimpleSAML \Module \adfs \SAML2 \XML \fed ;
44
5+ use Webmozard \Assert \Assert ;
6+
57/**
68 * Class representing fed Endpoint.
79 *
@@ -18,8 +20,8 @@ class Endpoint
1820 */
1921 public static function appendXML (\DOMElement $ parent , $ name , $ address )
2022 {
21- assert ( is_string ( $ name) );
22- assert ( is_string ( $ address) );
23+ Assert:: string ( $ name );
24+ Assert:: string ( $ address );
2325
2426 $ e = $ parent ->ownerDocument ->createElement ($ name );
2527 $ parent ->appendChild ($ e );
Original file line number Diff line number Diff line change 22
33namespace SimpleSAML \Module \adfs \SAML2 \XML \fed ;
44
5+ use Webmozart \Assert \Assert ;
6+
57/**
68 * Class representing SecurityTokenServiceType RoleDescriptor.
79 *
@@ -45,7 +47,7 @@ public function __construct(\DOMElement $xml = null)
4547 */
4648 public function toXML (\DOMElement $ parent )
4749 {
48- assert ( is_string ( $ this ->Location ) );
50+ Assert:: string ( $ this ->Location );
4951
5052 $ e = parent ::toXML ($ parent );
5153 $ e ->setAttributeNS ('http://www.w3.org/2000/xmlns/ ' , 'xmlns:fed ' , Constants::NS_FED );
Original file line number Diff line number Diff line change 11<?php
22
3+ use Webmozart \Assert \Assert ;
4+
35// load configuration and metadata
46$ config = \SimpleSAML \Configuration::getInstance ();
57$ metadata = \SimpleSAML \Metadata \MetaDataStorageHandler::getMetadataHandler ();
4648
4749 if ($ idpmeta ->hasValue ('https.certificate ' )) {
4850 $ httpsCert = \SimpleSAML \Utils \Crypto::loadPublicKey ($ idpmeta , true , 'https. ' );
49- assert ( isset ( $ httpsCert[ 'certData ' ]) );
51+ Assert:: keyExists ( $ httpsCert, 'certData ' );
5052 $ availableCerts ['https.crt ' ] = $ httpsCert ;
5153 $ keys [] = [
5254 'type ' => 'X509Certificate ' ,
Original file line number Diff line number Diff line change 1919 } elseif ($ _GET ['wa ' ] === 'wsignin1.0 ' ) {
2020 \SimpleSAML \Module \adfs \IdP \ADFS ::receiveAuthnRequest ($ idp );
2121 }
22- assert ( false );
22+ throw new \ Exception ( " Code should never be reached " );
2323} elseif (isset ($ _GET ['assocId ' ])) {
2424 // logout response from ADFS SP
2525 $ assocId = $ _GET ['assocId ' ]; // Association ID of the SP that sent the logout response
You can’t perform that action at this time.
0 commit comments