@@ -39,7 +39,6 @@ discard block |
||
| 39 | 39 | public function save(AbstractProvider $record, $runValidation = true, $attributeNames = null); |
| 40 | 40 | |
| 41 | 41 | /** |
| 42 | - * @param ProviderInterface $provider |
|
| 43 | 42 | * @return bool|int |
| 44 | 43 | */ |
| 45 | 44 | public function delete(ProviderInterface $record); |
@@ -50,6 +49,7 @@ discard block |
||
| 50 | 49 | * @param bool $runValidation |
| 51 | 50 | * @param array|null $attributeNames |
| 52 | 51 | * @throws \Exception |
| 52 | + * @return void |
|
| 53 | 53 | */ |
| 54 | 54 | public function linkToKey( |
| 55 | 55 | AbstractProvider $provider, |
@@ -8,10 +8,10 @@ |
||
| 8 | 8 | |
| 9 | 9 | namespace flipbox\saml\core\services; |
| 10 | 10 | |
| 11 | +use SAML2\XML\md\EntityDescriptor; |
|
| 11 | 12 | use flipbox\keychain\records\KeyChainRecord; |
| 12 | 13 | use flipbox\saml\core\records\AbstractProvider; |
| 13 | 14 | use flipbox\saml\core\records\ProviderInterface; |
| 14 | -use SAML2\XML\md\EntityDescriptor; |
|
| 15 | 15 | use yii\db\Query; |
| 16 | 16 | |
| 17 | 17 | interface ProviderServiceInterface |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | /** |
| 65 | - * @return mixed |
|
| 65 | + * @return \yii\web\Response |
|
| 66 | 66 | * @throws \yii\base\InvalidConfigException |
| 67 | 67 | */ |
| 68 | 68 | public function actionSave() |
@@ -9,7 +9,6 @@ |
||
| 9 | 9 | namespace flipbox\saml\core\controllers; |
| 10 | 10 | |
| 11 | 11 | use Craft; |
| 12 | -use craft\helpers\ArrayHelper; |
|
| 13 | 12 | use flipbox\saml\core\AbstractPlugin; |
| 14 | 13 | |
| 15 | 14 | /** |
@@ -69,6 +69,7 @@ |
||
| 69 | 69 | |
| 70 | 70 | /** |
| 71 | 71 | * @inheritdoc |
| 72 | + * @param string $type |
|
| 72 | 73 | */ |
| 73 | 74 | protected function findByType($type, $condition = []) |
| 74 | 75 | { |
@@ -8,6 +8,7 @@ discard block |
||
| 8 | 8 | |
| 9 | 9 | namespace flipbox\saml\core\services; |
| 10 | 10 | |
| 11 | +use SAML2\XML\md\EntityDescriptor; |
|
| 11 | 12 | use craft\base\Component; |
| 12 | 13 | use craft\helpers\Json; |
| 13 | 14 | use flipbox\keychain\records\KeyChainRecord; |
@@ -15,7 +16,6 @@ discard block |
||
| 15 | 16 | use flipbox\saml\core\records\AbstractProvider; |
| 16 | 17 | use flipbox\saml\core\records\LinkRecord; |
| 17 | 18 | use flipbox\saml\core\records\ProviderInterface; |
| 18 | -use SAML2\XML\md\EntityDescriptor; |
|
| 19 | 19 | |
| 20 | 20 | abstract class AbstractProviderService extends Component implements ProviderServiceInterface, EnsureSAMLPlugin |
| 21 | 21 | { |
@@ -9,8 +9,8 @@ |
||
| 9 | 9 | use Craft; |
| 10 | 10 | use craft\helpers\UrlHelper; |
| 11 | 11 | use flipbox\saml\core\AbstractPlugin; |
| 12 | -use flipbox\saml\core\controllers\cp\view\AbstractController; |
|
| 13 | 12 | use flipbox\saml\core\EnsureSAMLPlugin; |
| 13 | +use flipbox\saml\core\controllers\cp\view\AbstractController; |
|
| 14 | 14 | use flipbox\saml\core\models\SettingsInterface; |
| 15 | 15 | |
| 16 | 16 | /** |
@@ -10,7 +10,6 @@ |
||
| 10 | 10 | use craft\base\Field; |
| 11 | 11 | use craft\elements\User; |
| 12 | 12 | use craft\helpers\UrlHelper; |
| 13 | -use flipbox\saml\core\records\ProviderIdentityInterface; |
|
| 14 | 13 | use yii\db\Query; |
| 15 | 14 | |
| 16 | 15 | abstract class AbstractExternalIdentity extends Field implements \flipbox\saml\core\EnsureSAMLPlugin |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | 45 | * @param string $certificate |
| 46 | - * @return string|string[]|null |
|
| 46 | + * @return string |
|
| 47 | 47 | */ |
| 48 | 48 | public static function cleanCertificate(string $certificate) |
| 49 | 49 | { |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | /** |
| 58 | 58 | * @param string $certificate |
| 59 | - * @return string|string[]|null |
|
| 59 | + * @return string |
|
| 60 | 60 | */ |
| 61 | 61 | public static function cleanCertificateWhiteSpace(string $certificate) |
| 62 | 62 | { |
@@ -64,8 +64,8 @@ discard block |
||
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | - * @param $pem |
|
| 68 | - * @return mixed|string|null |
|
| 67 | + * @param string $pem |
|
| 68 | + * @return string |
|
| 69 | 69 | * @throws \Exception |
| 70 | 70 | * Thank you lightsaml/lightsaml |
| 71 | 71 | */ |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | |
| 116 | 116 | /** |
| 117 | 117 | * @param EncryptedAssertion $encryptedAssertion |
| 118 | - * @param $pemString |
|
| 118 | + * @param boolean|string $pemString |
|
| 119 | 119 | * @param array $blacklist |
| 120 | 120 | * @return \SAML2\Assertion |
| 121 | 121 | * @throws \Exception |
@@ -2,10 +2,10 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace flipbox\saml\core\helpers; |
| 4 | 4 | |
| 5 | -use flipbox\saml\core\AbstractPlugin; |
|
| 6 | 5 | use RobRichards\XMLSecLibs\XMLSecurityKey; |
| 7 | 6 | use SAML2\EncryptedAssertion; |
| 8 | 7 | use SAML2\Utilities\Certificate; |
| 8 | +use flipbox\saml\core\AbstractPlugin; |
|
| 9 | 9 | |
| 10 | 10 | class SecurityHelper |
| 11 | 11 | { |
@@ -3,9 +3,6 @@ discard block |
||
| 3 | 3 | |
| 4 | 4 | namespace flipbox\saml\core\records\traits; |
| 5 | 5 | |
| 6 | -use flipbox\saml\core\helpers\EntityDescriptorHelper; |
|
| 7 | -use flipbox\saml\core\helpers\SecurityHelper; |
|
| 8 | -use flipbox\saml\core\records\AbstractProvider; |
|
| 9 | 6 | use RobRichards\XMLSecLibs\XMLSecurityKey; |
| 10 | 7 | use SAML2\Certificate\Key; |
| 11 | 8 | use SAML2\Utilities\Certificate; |
@@ -16,6 +13,9 @@ discard block |
||
| 16 | 13 | use SAML2\XML\md\IndexedEndpointType; |
| 17 | 14 | use SAML2\XML\md\KeyDescriptor; |
| 18 | 15 | use SAML2\XML\md\SPSSODescriptor; |
| 16 | +use flipbox\saml\core\helpers\EntityDescriptorHelper; |
|
| 17 | +use flipbox\saml\core\helpers\SecurityHelper; |
|
| 18 | +use flipbox\saml\core\records\AbstractProvider; |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * Trait EntityDescriptor |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | /** |
| 125 | - * @return array |
|
| 125 | + * @return XMLSecurityKey[] |
|
| 126 | 126 | * @throws \Exception |
| 127 | 127 | */ |
| 128 | 128 | public function signingXMLSecurityKeyStore() |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | /** |
| 219 | - * @param array $keyDescriptors |
|
| 219 | + * @param KeyDescriptor[] $keyDescriptors |
|
| 220 | 220 | * @param string $signingOrEncrypt |
| 221 | 221 | * @return KeyDescriptor|null |
| 222 | 222 | */ |
@@ -3,13 +3,13 @@ |
||
| 3 | 3 | |
| 4 | 4 | namespace flipbox\saml\core\validators; |
| 5 | 5 | |
| 6 | -use flipbox\saml\core\records\AbstractProvider; |
|
| 6 | +use SAML2\Assertion\Validation\Result as AssertionResult; |
|
| 7 | 7 | use SAML2\Configuration\Destination; |
| 8 | +use SAML2\Response as SamlResponse; |
|
| 8 | 9 | use SAML2\Response\Validation\ConstraintValidator\DestinationMatches; |
| 9 | 10 | use SAML2\Response\Validation\ConstraintValidator\IsSuccessful; |
| 10 | 11 | use SAML2\Response\Validation\Result as ResponseResult; |
| 11 | -use SAML2\Assertion\Validation\Result as AssertionResult; |
|
| 12 | -use SAML2\Response as SamlResponse; |
|
| 12 | +use flipbox\saml\core\records\AbstractProvider; |
|
| 13 | 13 | |
| 14 | 14 | class Response |
| 15 | 15 | { |
@@ -7,11 +7,9 @@ |
||
| 7 | 7 | namespace flipbox\saml\core\controllers\cp\view\metadata; |
| 8 | 8 | |
| 9 | 9 | use Craft; |
| 10 | -use craft\elements\User; |
|
| 11 | 10 | use craft\helpers\UrlHelper; |
| 12 | 11 | use flipbox\keychain\KeyChain; |
| 13 | 12 | use flipbox\saml\core\AbstractPlugin; |
| 14 | -use flipbox\saml\core\helpers\MappingHelper; |
|
| 15 | 13 | use flipbox\saml\core\models\SettingsInterface; |
| 16 | 14 | use flipbox\saml\core\records\ProviderInterface; |
| 17 | 15 | |