Changeset 2100367
- Timestamp:
- 06/04/2019 11:20:25 AM (7 years ago)
- Location:
- id4me
- Files:
-
- 28 edited
- 1 copied
-
tags/1.0.2 (copied) (copied from id4me/trunk)
-
tags/1.0.2/id4me.php (modified) (1 diff)
-
tags/1.0.2/readme.txt (modified) (3 diffs)
-
tags/1.0.2/vendor (modified) (1 prop)
-
tags/1.0.2/vendor/composer/installed.json (modified) (3 diffs)
-
tags/1.0.2/vendor/id4me/id4me-rp/CHANGELOG.md (modified) (2 diffs)
-
tags/1.0.2/vendor/id4me/id4me-rp/Dockerfile (modified) (1 diff)
-
tags/1.0.2/vendor/id4me/id4me-rp/composer.json (modified) (2 diffs)
-
tags/1.0.2/vendor/id4me/id4me-rp/src/Authorization.php (modified) (2 diffs)
-
tags/1.0.2/vendor/id4me/id4me-rp/src/Model/Client.php (modified) (7 diffs)
-
tags/1.0.2/vendor/id4me/id4me-rp/src/Model/OpenIdConfig.php (modified) (33 diffs)
-
tags/1.0.2/vendor/id4me/id4me-rp/src/Service.php (modified) (2 diffs)
-
tags/1.0.2/vendor/id4me/id4me-rp/src/Validation.php (modified) (4 diffs)
-
tags/1.0.2/vendor/id4me/id4me-rp/tests/Mock/HttpClientGuzzle.php (modified) (2 diffs)
-
tags/1.0.2/vendor/id4me/id4me-rp/tests/ValidationTest.php (modified) (20 diffs)
-
trunk/id4me.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/vendor (modified) (1 prop)
-
trunk/vendor/composer/installed.json (modified) (3 diffs)
-
trunk/vendor/id4me/id4me-rp/CHANGELOG.md (modified) (2 diffs)
-
trunk/vendor/id4me/id4me-rp/Dockerfile (modified) (1 diff)
-
trunk/vendor/id4me/id4me-rp/composer.json (modified) (2 diffs)
-
trunk/vendor/id4me/id4me-rp/src/Authorization.php (modified) (2 diffs)
-
trunk/vendor/id4me/id4me-rp/src/Model/Client.php (modified) (7 diffs)
-
trunk/vendor/id4me/id4me-rp/src/Model/OpenIdConfig.php (modified) (33 diffs)
-
trunk/vendor/id4me/id4me-rp/src/Service.php (modified) (2 diffs)
-
trunk/vendor/id4me/id4me-rp/src/Validation.php (modified) (4 diffs)
-
trunk/vendor/id4me/id4me-rp/tests/Mock/HttpClientGuzzle.php (modified) (2 diffs)
-
trunk/vendor/id4me/id4me-rp/tests/ValidationTest.php (modified) (20 diffs)
Legend:
- Unmodified
- Added
- Removed
-
id4me/tags/1.0.2/id4me.php
r2082608 r2100367 4 4 * Plugin URI: https://wordpress.org/plugins/id4me/ 5 5 * Description: One ID for everything. Log in into your WordPress with your domain, through any service you like! 6 * Version: 1.0. 06 * Version: 1.0.2 7 7 * License: MIT 8 8 * Author: 1&1 IONOS 9 9 * Author URI: https://www.ionos.com 10 * Requires PHP: 7. 110 * Requires PHP: 7.0 11 11 * Text Domain: id4me 12 12 */ -
id4me/tags/1.0.2/readme.txt
r2082608 r2100367 1 1 === ID4me === 2 Contributors: gdespoulain, herrfeldmann, kimalumalu, pfefferle, rinma 2 Contributors: gdespoulain, herrfeldmann, kimalumalu, pfefferle, rinma, ionos 3 3 Tags: ID4me, login, domain 4 4 Requires at least: 5.0 5 Requires PHP: 7. 16 Tested up to: 5. 17 Stable tag: 1.0. 05 Requires PHP: 7.0 6 Tested up to: 5.2 7 Stable tag: 1.0.2 8 8 License: MIT 9 9 License URI: https://opensource.org/licenses/MIT … … 35 35 36 36 == Changelog == 37 38 = 1.0.2 = 39 40 * Update library version to 1.1.0 41 42 = 1.0.1 = 43 44 * Update doc with tested up to 5.2 37 45 38 46 = 1.0.0 = … … 103 111 = Configuration of users = 104 112 105 **Note:** The (current) **1.0. 0** version only works with already registered WordPress users (who indicated their ID4me identifier113 **Note:** The (current) **1.0.2** version only works with already registered WordPress users (who indicated their ID4me identifier 106 114 in the **ID4me identifier** profile field). Next versions will include a more complex user management. 107 115 -
id4me/tags/1.0.2/vendor
-
Property
svn:ignore
set to
bin
-
Property
svn:ignore
set to
-
id4me/tags/1.0.2/vendor/composer/installed.json
r2082608 r2100367 218 218 { 219 219 "name": "id4me/id4me-rp", 220 "version": "1. 0.0",221 "version_normalized": "1. 0.0.0",220 "version": "1.1.0", 221 "version_normalized": "1.1.0.0", 222 222 "source": { 223 223 "type": "git", 224 224 "url": "https://gitlab.com/ID4me/id4me-rp-client-php.git", 225 "reference": " 4bcbd443be46f3555a09f10e9422f3fc03b2e89b"225 "reference": "fc5760acfb7f79f0114d6d167b4a9726313d727f" 226 226 }, 227 227 "dist": { 228 228 "type": "zip", 229 "url": "https://gitlab.com/api/v4/projects/ID4me%2Fid4me-rp-client-php/repository/archive.zip?sha= 4bcbd443be46f3555a09f10e9422f3fc03b2e89b",230 "reference": " 4bcbd443be46f3555a09f10e9422f3fc03b2e89b",229 "url": "https://gitlab.com/api/v4/projects/ID4me%2Fid4me-rp-client-php/repository/archive.zip?sha=fc5760acfb7f79f0114d6d167b4a9726313d727f", 230 "reference": "fc5760acfb7f79f0114d6d167b4a9726313d727f", 231 231 "shasum": "" 232 232 }, … … 234 234 "ext-json": "*", 235 235 "ext-openssl": "*", 236 "php": ">=7. 1",236 "php": ">=7.0", 237 237 "phpseclib/phpseclib": "^2.0" 238 238 }, … … 241 241 "guzzlehttp/guzzle": "^6.2", 242 242 "guzzlehttp/psr7": "1.5.*", 243 "phpunit/phpunit": "^ 8.0"244 }, 245 "time": "2019-05- 07T09:35:43+00:00",243 "phpunit/phpunit": "^6" 244 }, 245 "time": "2019-05-15T14:46:46+00:00", 246 246 "type": "library", 247 247 "installation-source": "dist", -
id4me/tags/1.0.2/vendor/id4me/id4me-rp/CHANGELOG.md
r2082608 r2100367 6 6 7 7 ## [Unreleased] 8 9 ## [1.1.0] - 2019-05-15 10 ### Changed 11 - PHP 7.1 to PHP 7.0 as minimal required version 8 12 9 13 ## [1.0.0] - 2019-05-07 … … 29 33 - Initial 30 34 31 [Unreleased]: https://gitlab.com/ID4me/id4me-rp-client-php/compare/master...1.0.0 35 [Unreleased]: https://gitlab.com/ID4me/id4me-rp-client-php/compare/master...1.1.0 36 [1.1.0]: https://gitlab.com/ID4me/id4me-rp-client-php/tags/1.1.0 32 37 [1.0.0]: https://gitlab.com/ID4me/id4me-rp-client-php/tags/1.0.0 33 38 [0.1.0]: https://gitlab.com/ID4me/id4me-rp-client-php/tags/0.1.0 -
id4me/tags/1.0.2/vendor/id4me/id4me-rp/Dockerfile
r2082608 r2100367 1 1 # Dockerfile 2 FROM php:7. 2-apache2 FROM php:7.0-apache 3 3 4 4 RUN apt-get update \ 5 5 && apt-get install -y \ 6 6 git \ 7 libgmp-dev \8 7 curl \ 9 8 nano \ 10 gpm \11 9 unzip \ 12 10 netcat 13 11 14 12 RUN ln -s /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini 15 RUN docker-php-ext-install gmp16 13 RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer 17 14 -
id4me/tags/1.0.2/vendor/id4me/id4me-rp/composer.json
r2082608 r2100367 7 7 "ext-json": "*", 8 8 "ext-openssl": "*", 9 "php": ">=7. 1",9 "php": ">=7.0", 10 10 "phpseclib/phpseclib": "^2.0" 11 11 }, … … 13 13 "guzzlehttp/guzzle": "^6.2", 14 14 "guzzlehttp/psr7": "1.5.*", 15 "phpunit/phpunit": "^ 8.0",15 "phpunit/phpunit": "^6", 16 16 "ext-readline": "*" 17 17 }, -
id4me/tags/1.0.2/vendor/id4me/id4me-rp/src/Authorization.php
r2082608 r2100367 216 216 * @param HttpClient $httpClient 217 217 */ 218 public function setHttpClient(HttpClient $httpClient) : void218 public function setHttpClient(HttpClient $httpClient) 219 219 { 220 220 $this->httpClient = $httpClient; … … 226 226 * @param Validation $validation 227 227 */ 228 public function setValidation(Validation $validation) : void228 public function setValidation(Validation $validation) 229 229 { 230 230 $this->validation = $validation; -
id4me/tags/1.0.2/vendor/id4me/id4me-rp/src/Model/Client.php
r2082608 r2100367 78 78 * @param string $issuer 79 79 */ 80 public function setIssuer(string $issuer) : void80 public function setIssuer(string $issuer) 81 81 { 82 82 $this->issuer = $issuer; … … 94 94 * @param string $clientName 95 95 */ 96 public function setClientName(string $clientName) : void96 public function setClientName(string $clientName) 97 97 { 98 98 $this->clientName = $clientName; … … 110 110 * @param string $clientId 111 111 */ 112 public function setClientId(string $clientId) : void112 public function setClientId(string $clientId) 113 113 { 114 114 $this->clientId = $clientId; … … 126 126 * @param string $clientSecret 127 127 */ 128 public function setClientSecret(string $clientSecret) : void128 public function setClientSecret(string $clientSecret) 129 129 { 130 130 $this->clientSecret = $clientSecret; … … 142 142 * @param int $clientExpirationTime 143 143 */ 144 public function setClientExpirationTime(int $clientExpirationTime) : void144 public function setClientExpirationTime(int $clientExpirationTime) 145 145 { 146 146 $this->clientExpirationTime = $clientExpirationTime; … … 158 158 * @param string $activeRedirectUri 159 159 */ 160 public function setActiveRedirectUri(string $activeRedirectUri) : void160 public function setActiveRedirectUri(string $activeRedirectUri) 161 161 { 162 162 $this->activeRedirectUri = $activeRedirectUri; … … 174 174 * @param array $redirectUris 175 175 */ 176 public function setRedirectUris(array $redirectUris) : void176 public function setRedirectUris(array $redirectUris) 177 177 { 178 178 $this->redirectUris = $redirectUris; -
id4me/tags/1.0.2/vendor/id4me/id4me-rp/src/Model/OpenIdConfig.php
r2082608 r2100367 198 198 * @param string $issuer 199 199 */ 200 public function setIssuer(string $issuer) : void200 public function setIssuer(string $issuer) 201 201 { 202 202 $this->issuer = $issuer; … … 214 214 * @param string $jwksUri 215 215 */ 216 public function setJwksUri(string $jwksUri) : void216 public function setJwksUri(string $jwksUri) 217 217 { 218 218 $this->jwks_uri = $jwksUri; … … 230 230 * @param string $authorizationEndpoint 231 231 */ 232 public function setAuthorizationEndpoint(string $authorizationEndpoint) : void232 public function setAuthorizationEndpoint(string $authorizationEndpoint) 233 233 { 234 234 $this->authorization_endpoint = $authorizationEndpoint; … … 246 246 * @param string $tokenEndpoint 247 247 */ 248 public function setTokenEndpoint(string $tokenEndpoint) : void248 public function setTokenEndpoint(string $tokenEndpoint) 249 249 { 250 250 $this->token_endpoint = $tokenEndpoint; … … 262 262 * @param string $registrationEndpoint 263 263 */ 264 public function setRegistrationEndpoint(string $registrationEndpoint) : void264 public function setRegistrationEndpoint(string $registrationEndpoint) 265 265 { 266 266 $this->registration_endpoint = $registrationEndpoint; … … 278 278 * @param string $introspectionEndpoint 279 279 */ 280 public function setIntrospectionEndpoint(string $introspectionEndpoint) : void280 public function setIntrospectionEndpoint(string $introspectionEndpoint) 281 281 { 282 282 $this->introspection_endpoint = $introspectionEndpoint; … … 294 294 * @param string $revocationEndpoint 295 295 */ 296 public function setRevocationEndpoint(string $revocationEndpoint) : void296 public function setRevocationEndpoint(string $revocationEndpoint) 297 297 { 298 298 $this->revocation_endpoint = $revocationEndpoint; … … 310 310 * @param string $userInfoEndpoint 311 311 */ 312 public function setUserInfoEndpoint(string $userInfoEndpoint) : void312 public function setUserInfoEndpoint(string $userInfoEndpoint) 313 313 { 314 314 $this->userinfo_endpoint = $userInfoEndpoint; … … 326 326 * @param string $endSessionEndpoint 327 327 */ 328 public function setEndSessionEndpoint(string $endSessionEndpoint) : void328 public function setEndSessionEndpoint(string $endSessionEndpoint) 329 329 { 330 330 $this->end_session_endpoint = $endSessionEndpoint; … … 342 342 * @param array $scopesSupported 343 343 */ 344 public function setScopesSupported(array $scopesSupported) : void344 public function setScopesSupported(array $scopesSupported) 345 345 { 346 346 $this->scopes_supported = $scopesSupported; … … 358 358 * @param array $responseTypesSupported 359 359 */ 360 public function setResponseTypesSupported(array $responseTypesSupported) : void360 public function setResponseTypesSupported(array $responseTypesSupported) 361 361 { 362 362 $this->response_types_supported = $responseTypesSupported; … … 374 374 * @param array $responseModesSupported 375 375 */ 376 public function setResponseModesSupported(array $responseModesSupported) : void376 public function setResponseModesSupported(array $responseModesSupported) 377 377 { 378 378 $this->response_modes_supported = $responseModesSupported; … … 390 390 * @param array $grantTypesSupported 391 391 */ 392 public function setGrantTypesSupported(array $grantTypesSupported) : void392 public function setGrantTypesSupported(array $grantTypesSupported) 393 393 { 394 394 $this->grant_types_supported = $grantTypesSupported; … … 406 406 * @param array $codeChallengeMethodsSupported 407 407 */ 408 public function setCodeChallengeMethodsSupported(array $codeChallengeMethodsSupported) : void408 public function setCodeChallengeMethodsSupported(array $codeChallengeMethodsSupported) 409 409 { 410 410 $this->code_challenge_methods_supported = $codeChallengeMethodsSupported; … … 422 422 * @param array $tokenEndpointAuthMethodsSupported 423 423 */ 424 public function setTokenEndpointAuthMethodsSupported(array $tokenEndpointAuthMethodsSupported) : void424 public function setTokenEndpointAuthMethodsSupported(array $tokenEndpointAuthMethodsSupported) 425 425 { 426 426 $this->token_endpoint_auth_methods_supported = $tokenEndpointAuthMethodsSupported; … … 438 438 * @param array $tokenEndpointAuthSigningAlgValuesSupported 439 439 */ 440 public function setTokenEndpointAuthSigningAlgValuesSupported(array $tokenEndpointAuthSigningAlgValuesSupported) : void440 public function setTokenEndpointAuthSigningAlgValuesSupported(array $tokenEndpointAuthSigningAlgValuesSupported) 441 441 { 442 442 $this->token_endpoint_auth_signing_alg_values_supported = $tokenEndpointAuthSigningAlgValuesSupported; … … 454 454 * @param array $requestObjectSigningAlgValuesSupported 455 455 */ 456 public function setRequestObjectSigningAlgValuesSupported(array $requestObjectSigningAlgValuesSupported) : void456 public function setRequestObjectSigningAlgValuesSupported(array $requestObjectSigningAlgValuesSupported) 457 457 { 458 458 $this->request_object_signing_alg_values_supported = $requestObjectSigningAlgValuesSupported; … … 470 470 * @param array $uiLocalesSupported 471 471 */ 472 public function setUiLocalesSupported(array $uiLocalesSupported) : void472 public function setUiLocalesSupported(array $uiLocalesSupported) 473 473 { 474 474 $this->ui_locales_supported = $uiLocalesSupported; … … 486 486 * @param bool $requestParameterSupported 487 487 */ 488 public function setRequestParameterSupported(bool $requestParameterSupported) : void488 public function setRequestParameterSupported(bool $requestParameterSupported) 489 489 { 490 490 $this->request_parameter_supported = $requestParameterSupported; … … 502 502 * @param array $idTokenSigningAlgValuesSupported 503 503 */ 504 public function setIdTokenSigningAlgValuesSupported(array $idTokenSigningAlgValuesSupported) : void504 public function setIdTokenSigningAlgValuesSupported(array $idTokenSigningAlgValuesSupported) 505 505 { 506 506 $this->id_token_signing_alg_values_supported = $idTokenSigningAlgValuesSupported; … … 518 518 * @param array $idTokenEncryptionEncValuesSupported 519 519 */ 520 public function setIdTokenEncryptionEncValuesSupported(array $idTokenEncryptionEncValuesSupported) : void520 public function setIdTokenEncryptionEncValuesSupported(array $idTokenEncryptionEncValuesSupported) 521 521 { 522 522 $this->id_token_encryption_enc_values_supported = $idTokenEncryptionEncValuesSupported; … … 534 534 * @param array $userInfoSigningAlgValuesSupported 535 535 */ 536 public function setUserInfoSigningAlgValuesSupported(array $userInfoSigningAlgValuesSupported) : void536 public function setUserInfoSigningAlgValuesSupported(array $userInfoSigningAlgValuesSupported) 537 537 { 538 538 $this->userinfo_signing_alg_values_supported = $userInfoSigningAlgValuesSupported; … … 550 550 * @param array $userInfoEncryptionAlgValuesSupported 551 551 */ 552 public function setUserInfoEncryptionAlgValuesSupported(array $userInfoEncryptionAlgValuesSupported) : void552 public function setUserInfoEncryptionAlgValuesSupported(array $userInfoEncryptionAlgValuesSupported) 553 553 { 554 554 $this->userinfo_encryption_alg_values_supported = $userInfoEncryptionAlgValuesSupported; … … 566 566 * @param array $displayValuesSupported 567 567 */ 568 public function setDisplayValuesSupported(array $displayValuesSupported) : void568 public function setDisplayValuesSupported(array $displayValuesSupported) 569 569 { 570 570 $this->display_values_supported = $displayValuesSupported; … … 582 582 * @param array $claimTypesSupported 583 583 */ 584 public function setClaimTypesSupported(array $claimTypesSupported) : void584 public function setClaimTypesSupported(array $claimTypesSupported) 585 585 { 586 586 $this->claim_types_supported = $claimTypesSupported; … … 598 598 * @param array $claimsSupported 599 599 */ 600 public function setClaimsSupported(array $claimsSupported) : void600 public function setClaimsSupported(array $claimsSupported) 601 601 { 602 602 $this->claims_supported = $claimsSupported; … … 614 614 * @param bool $claimsParameterSupported 615 615 */ 616 public function setClaimsParameterSupported(bool $claimsParameterSupported) : void616 public function setClaimsParameterSupported(bool $claimsParameterSupported) 617 617 { 618 618 $this->claims_parameter_supported = $claimsParameterSupported; … … 630 630 * @param bool $frontChannelLogoutSupported 631 631 */ 632 public function setFrontChannelLogoutSupported(bool $frontChannelLogoutSupported) : void632 public function setFrontChannelLogoutSupported(bool $frontChannelLogoutSupported) 633 633 { 634 634 $this->front_channel_logout_supported = $frontChannelLogoutSupported; … … 646 646 * @param bool $backChannelLogoutSupported 647 647 */ 648 public function setBackChannelLogoutSupported(bool $backChannelLogoutSupported) : void648 public function setBackChannelLogoutSupported(bool $backChannelLogoutSupported) 649 649 { 650 650 $this->back_channel_logout_supported = $backChannelLogoutSupported; … … 662 662 * @param bool $requestUriParameterSupported 663 663 */ 664 public function setRequestUriParameterSupported(bool $requestUriParameterSupported) : void664 public function setRequestUriParameterSupported(bool $requestUriParameterSupported) 665 665 { 666 666 $this->request_uri_parameter_supported = $requestUriParameterSupported; … … 678 678 * @param bool $requireRequestUriRegistration 679 679 */ 680 public function setRequireRequestUriRegistration(bool $requireRequestUriRegistration) : void680 public function setRequireRequestUriRegistration(bool $requireRequestUriRegistration) 681 681 { 682 682 $this->require_request_uri_registration = $requireRequestUriRegistration; … … 694 694 * @param int $tlsClientCertificateBoundAccessTokens 695 695 */ 696 public function setTlsClientCertificateBoundAccessTokens(int $tlsClientCertificateBoundAccessTokens) : void696 public function setTlsClientCertificateBoundAccessTokens(int $tlsClientCertificateBoundAccessTokens) 697 697 { 698 698 $this->tls_client_certificate_bound_access_tokens = $tlsClientCertificateBoundAccessTokens; … … 710 710 * @param int $requestUriQuota 711 711 */ 712 public function setRequestUriQuota(int $requestUriQuota) : void712 public function setRequestUriQuota(int $requestUriQuota) 713 713 { 714 714 $this->request_uri_quota = $requestUriQuota; -
id4me/tags/1.0.2/vendor/id4me/id4me-rp/src/Service.php
r2082608 r2100367 200 200 * @param Authorization $authorization 201 201 */ 202 public function setAuthorization(Authorization $authorization) : void202 public function setAuthorization(Authorization $authorization) 203 203 { 204 204 $this->authorization = $authorization; … … 210 210 * @param OpenIdConfigHelper $openConfigHelper 211 211 */ 212 public function setOpenConfigHelper(OpenIdConfigHelper $openConfigHelper) : void212 public function setOpenConfigHelper(OpenIdConfigHelper $openConfigHelper) 213 213 { 214 214 $this->openConfigHelper = $openConfigHelper; -
id4me/tags/1.0.2/vendor/id4me/id4me-rp/src/Validation.php
r2082608 r2100367 37 37 * @throws InvalidAuthorityIssuerException if provided iss and issuer values are not equal 38 38 */ 39 public function validateISS(string $originIssuer, string $deliveredIssuer, bool $exactMatch = true) : void39 public function validateISS(string $originIssuer, string $deliveredIssuer, bool $exactMatch = true) 40 40 { 41 41 if ($exactMatch && ($originIssuer !== $deliveredIssuer)) { … … 63 63 IdToken $idToken, 64 64 array $jwksArray 65 ) : void{65 ) { 66 66 67 67 if ($algorithm != 'RS256') { … … 110 110 * @throws InvalidIDTokenException 111 111 */ 112 public function validateAudience($audience, $authorizedParty, string $clientId) : void112 public function validateAudience($audience, $authorizedParty, string $clientId) 113 113 { 114 114 $isValidAudience = false; … … 163 163 * @throws InvalidIDTokenException 164 164 */ 165 public function validateExpirationTime(string $expirationTime) : void165 public function validateExpirationTime(string $expirationTime) 166 166 { 167 167 $isValidExpirationTime = false; -
id4me/tags/1.0.2/vendor/id4me/id4me-rp/tests/Mock/HttpClientGuzzle.php
r2082608 r2100367 8 8 class HttpClientGuzzle implements HttpClient { 9 9 10 public function get($url, $headers = [])10 public function get($url, array $headers = []) 11 11 { 12 12 $httpClient = new Client(); … … 17 17 } 18 18 19 public function post($url, $body, $headers = [])19 public function post($url, $body, array $headers = []) 20 20 { 21 21 $httpClient = new Client(); -
id4me/tags/1.0.2/vendor/id4me/id4me-rp/tests/ValidationTest.php
r2082608 r2100367 26 26 IdToken $idToken, 27 27 array $jwksArray, 28 string $exceptionMessage 29 ): void { 30 31 if ($exceptionMessage) { 32 $this->expectException(InvalidIDTokenException::class); 33 $this->expectExceptionMessage($exceptionMessage); 34 } else { 35 $this->expectNotToPerformAssertions(); 28 string $expectedErrorMsg, 29 string $expectedExceptionType 30 ) { 31 $thrownExceptionMsg = ''; 32 $thrownExceptionType = ''; 33 34 try { 35 $validation = new Validation(); 36 $validation->validateIdTokenSignature( 37 $usedKey, 38 $algorithm, 39 $idToken, 40 $jwksArray 41 ); 42 } catch (Exception $e) { 43 $thrownExceptionMsg = $e->getMessage(); 44 $thrownExceptionType = get_class($e); 36 45 } 37 38 $validation = new Validation(); 39 $validation->validateIdTokenSignature( 40 $usedKey, 41 $algorithm, 42 $idToken, 43 $jwksArray 44 ); 46 $this->assertEquals($thrownExceptionMsg, $expectedErrorMsg); 47 $this->assertEquals($thrownExceptionType, $expectedExceptionType); 45 48 } 46 49 … … 61 64 $idToken, 62 65 $jwks, 66 '', 63 67 '' 64 68 ], … … 68 72 new IdToken('t.e.s.t'), 69 73 $jwks, 70 Validation::INVALID_ID_TOKEN_SIGNATURE_EXCEPTION 74 Validation::INVALID_ID_TOKEN_SIGNATURE_EXCEPTION, 75 get_class(new InvalidIDTokenException) 71 76 ], 72 77 [ … … 75 80 $idToken, 76 81 $jwks, 77 Validation::INVALID_ID_TOKEN_JWS_KEYSET_KEY_NOT_FOUND 82 Validation::INVALID_ID_TOKEN_JWS_KEYSET_KEY_NOT_FOUND, 83 get_class(new InvalidIDTokenException) 78 84 ], 79 85 [ … … 82 88 $idToken, 83 89 $jwks, 84 sprintf(Validation::INVALID_ID_TOKEN_ALGORITHM_EXCEPTION, 'wrong-algo') 90 sprintf(Validation::INVALID_ID_TOKEN_ALGORITHM_EXCEPTION, 'wrong-algo'), 91 get_class(new InvalidIDTokenException) 85 92 ] 86 93 ]; … … 103 110 string $deliveredIssuer, 104 111 bool $exactMatch, 105 bool $throwsException 106 ): void { 107 108 if ($throwsException) { 109 $this->expectException(InvalidAuthorityIssuerException::class); 110 $this->expectExceptionMessage(Validation::INVALID_ID_TOKEN_ISSUER_EXCEPTION); 111 } else { 112 $this->expectNotToPerformAssertions(); 112 string $expectedErrorMsg, 113 string $expectedExceptionType 114 ) { 115 $thrownExceptionMsg = ''; 116 $thrownExceptionType = ''; 117 118 try { 119 $validation = new Validation(); 120 $validation->validateISS( 121 $originIssuer, 122 $deliveredIssuer, 123 $exactMatch 124 ); 125 } catch (Exception $e) { 126 $thrownExceptionMsg = $e->getMessage(); 127 $thrownExceptionType = get_class($e); 113 128 } 114 115 $validation = new Validation(); 116 $validation->validateISS( 117 $originIssuer, 118 $deliveredIssuer, 119 $exactMatch 120 ); 129 $this->assertEquals($thrownExceptionMsg, $expectedErrorMsg); 130 $this->assertEquals($thrownExceptionType, $expectedExceptionType); 121 131 } 122 132 … … 133 143 'https://id.test.denic.de', 134 144 true, 135 false 145 '', 146 '' 136 147 ], 137 148 [ … … 139 150 'https://id.test.denic.de', 140 151 false, 141 false 152 '', 153 '' 142 154 ], 143 155 [ … … 145 157 'id.test.denic.de', 146 158 true, 147 true 159 Validation::INVALID_ID_TOKEN_ISSUER_EXCEPTION, 160 get_class(new InvalidAuthorityIssuerException) 148 161 ], 149 162 [ … … 151 164 'https://id.test.denic.com', 152 165 true, 153 true 166 Validation::INVALID_ID_TOKEN_ISSUER_EXCEPTION, 167 get_class(new InvalidAuthorityIssuerException) 154 168 ] 155 169 ]; … … 172 186 string $authorizedParty, 173 187 string $clientId, 174 bool $throwsException 175 ): void { 176 177 if ($throwsException) { 178 $this->expectException(InvalidIDTokenException::class); 179 $this->expectExceptionMessage(Validation::INVALID_ID_TOKEN_AUDIENCE_EXCEPTION); 180 } else { 181 $this->expectNotToPerformAssertions(); 188 string $expectedErrorMsg, 189 string $expectedExceptionType 190 ) { 191 $thrownExceptionMsg = ''; 192 $thrownExceptionType = ''; 193 try { 194 $validation = new Validation(); 195 $validation->validateAudience( 196 $audience, 197 $authorizedParty, 198 $clientId 199 ); 200 } catch (Exception $e) { 201 $thrownExceptionMsg = $e->getMessage(); 202 $thrownExceptionType = get_class($e); 182 203 } 183 184 $validation = new Validation(); 185 $validation->validateAudience( 186 $audience, 187 $authorizedParty, 188 $clientId 189 ); 204 $this->assertEquals($thrownExceptionMsg, $expectedErrorMsg); 205 $this->assertEquals($thrownExceptionType, $expectedExceptionType); 190 206 } 191 207 … … 202 218 '', 203 219 '7ftj6vw545suk', 204 false 205 ], 206 [ 207 '7ftj6vw545suk', 208 '7ftj6vw545suk', 209 '7ftj6vw545suk', 210 false 220 '', 221 '' 222 ], 223 [ 224 '7ftj6vw545suk', 225 '7ftj6vw545suk', 226 '7ftj6vw545suk', 227 '', 228 '' 211 229 ], 212 230 [ … … 214 232 '', 215 233 'wrong-client-id', 216 true 234 Validation::INVALID_ID_TOKEN_AUDIENCE_EXCEPTION, 235 get_class(new InvalidIDTokenException) 217 236 ], 218 237 [ … … 220 239 '7ftj6vw545suk', 221 240 '7ftj6vw545suk', 222 false 241 '', 242 '' 223 243 ], 224 244 [ … … 226 246 '', 227 247 '7ftj6vw545suk', 228 true 229 ], 230 [ 231 '', 232 '7ftj6vw545suk', 233 '7ftj6vw545suk', 234 true 248 Validation::INVALID_ID_TOKEN_AUDIENCE_EXCEPTION, 249 get_class(new InvalidIDTokenException) 250 ], 251 [ 252 '', 253 '7ftj6vw545suk', 254 '7ftj6vw545suk', 255 Validation::INVALID_ID_TOKEN_AUDIENCE_EXCEPTION, 256 get_class(new InvalidIDTokenException) 235 257 ], 236 258 [ … … 238 260 'vwsvw5', 239 261 '7ftj6vw545suk', 240 true 262 Validation::INVALID_ID_TOKEN_AUDIENCE_EXCEPTION, 263 get_class(new InvalidIDTokenException) 241 264 ] 242 265 ]; … … 255 278 public function testValidateIDTokenExpirationTime( 256 279 string $expirationTime, 257 bool $throwsException 258 ): void { 259 260 if ($throwsException) { 261 $this->expectException(InvalidIDTokenException::class); 262 $this->expectExceptionMessage(Validation::INVALID_ID_TOKEN_EXPIRATION_TIME_EXCEPTION); 263 } else { 264 $this->expectNotToPerformAssertions(); 280 string $expectedErrorMsg, 281 string $expectedExceptionType 282 ) { 283 $thrownExceptionMsg = ''; 284 $thrownExceptionType = ''; 285 try { 286 $validation = new Validation(); 287 $validation->validateExpirationTime( 288 $expirationTime 289 ); 290 } catch (Exception $e) { 291 $thrownExceptionMsg = $e->getMessage(); 292 $thrownExceptionType = get_class($e); 265 293 } 266 267 $validation = new Validation(); 268 $validation->validateExpirationTime($expirationTime); 294 $this->assertEquals($thrownExceptionMsg, $expectedErrorMsg); 295 $this->assertEquals($thrownExceptionType, $expectedExceptionType); 269 296 } 270 297 … … 279 306 [ 280 307 (string) mktime(10, 30, 30, 1, 1, 2050), 281 false 282 ], 283 [ 284 '', 285 true 308 '', 309 '' 310 ], 311 [ 312 '', 313 Validation::INVALID_ID_TOKEN_EXPIRATION_TIME_EXCEPTION, 314 get_class(new InvalidIDTokenException) 315 286 316 ], 287 317 [ 288 318 (string) mktime(10, 30, 30, 1, 1, 1950), 289 true 319 Validation::INVALID_ID_TOKEN_EXPIRATION_TIME_EXCEPTION, 320 get_class(new InvalidIDTokenException) 290 321 ] 291 322 ]; … … 323 354 324 355 // Header data value test 325 $this->assert IsArray($idToken->getDecodedHeader());356 $this->assertTrue(is_array($idToken->getDecodedHeader())); 326 357 $this->assertSame( 327 358 $idToken->getDecodedHeader(), … … 333 364 334 365 // Body data value test 335 $this->assert IsArray($idToken->getDecodedBody());366 $this->assertTrue(is_array($idToken->getDecodedBody())); 336 367 $this->assertSame( 337 368 $idToken->getDecodedBody(), -
id4me/trunk/id4me.php
r2082608 r2100367 4 4 * Plugin URI: https://wordpress.org/plugins/id4me/ 5 5 * Description: One ID for everything. Log in into your WordPress with your domain, through any service you like! 6 * Version: 1.0. 06 * Version: 1.0.2 7 7 * License: MIT 8 8 * Author: 1&1 IONOS 9 9 * Author URI: https://www.ionos.com 10 * Requires PHP: 7. 110 * Requires PHP: 7.0 11 11 * Text Domain: id4me 12 12 */ -
id4me/trunk/readme.txt
r2082608 r2100367 1 1 === ID4me === 2 Contributors: gdespoulain, herrfeldmann, kimalumalu, pfefferle, rinma 2 Contributors: gdespoulain, herrfeldmann, kimalumalu, pfefferle, rinma, ionos 3 3 Tags: ID4me, login, domain 4 4 Requires at least: 5.0 5 Requires PHP: 7. 16 Tested up to: 5. 17 Stable tag: 1.0. 05 Requires PHP: 7.0 6 Tested up to: 5.2 7 Stable tag: 1.0.2 8 8 License: MIT 9 9 License URI: https://opensource.org/licenses/MIT … … 35 35 36 36 == Changelog == 37 38 = 1.0.2 = 39 40 * Update library version to 1.1.0 41 42 = 1.0.1 = 43 44 * Update doc with tested up to 5.2 37 45 38 46 = 1.0.0 = … … 103 111 = Configuration of users = 104 112 105 **Note:** The (current) **1.0. 0** version only works with already registered WordPress users (who indicated their ID4me identifier113 **Note:** The (current) **1.0.2** version only works with already registered WordPress users (who indicated their ID4me identifier 106 114 in the **ID4me identifier** profile field). Next versions will include a more complex user management. 107 115 -
id4me/trunk/vendor
-
Property
svn:ignore
set to
bin
-
Property
svn:ignore
set to
-
id4me/trunk/vendor/composer/installed.json
r2082608 r2100367 218 218 { 219 219 "name": "id4me/id4me-rp", 220 "version": "1. 0.0",221 "version_normalized": "1. 0.0.0",220 "version": "1.1.0", 221 "version_normalized": "1.1.0.0", 222 222 "source": { 223 223 "type": "git", 224 224 "url": "https://gitlab.com/ID4me/id4me-rp-client-php.git", 225 "reference": " 4bcbd443be46f3555a09f10e9422f3fc03b2e89b"225 "reference": "fc5760acfb7f79f0114d6d167b4a9726313d727f" 226 226 }, 227 227 "dist": { 228 228 "type": "zip", 229 "url": "https://gitlab.com/api/v4/projects/ID4me%2Fid4me-rp-client-php/repository/archive.zip?sha= 4bcbd443be46f3555a09f10e9422f3fc03b2e89b",230 "reference": " 4bcbd443be46f3555a09f10e9422f3fc03b2e89b",229 "url": "https://gitlab.com/api/v4/projects/ID4me%2Fid4me-rp-client-php/repository/archive.zip?sha=fc5760acfb7f79f0114d6d167b4a9726313d727f", 230 "reference": "fc5760acfb7f79f0114d6d167b4a9726313d727f", 231 231 "shasum": "" 232 232 }, … … 234 234 "ext-json": "*", 235 235 "ext-openssl": "*", 236 "php": ">=7. 1",236 "php": ">=7.0", 237 237 "phpseclib/phpseclib": "^2.0" 238 238 }, … … 241 241 "guzzlehttp/guzzle": "^6.2", 242 242 "guzzlehttp/psr7": "1.5.*", 243 "phpunit/phpunit": "^ 8.0"244 }, 245 "time": "2019-05- 07T09:35:43+00:00",243 "phpunit/phpunit": "^6" 244 }, 245 "time": "2019-05-15T14:46:46+00:00", 246 246 "type": "library", 247 247 "installation-source": "dist", -
id4me/trunk/vendor/id4me/id4me-rp/CHANGELOG.md
r2082608 r2100367 6 6 7 7 ## [Unreleased] 8 9 ## [1.1.0] - 2019-05-15 10 ### Changed 11 - PHP 7.1 to PHP 7.0 as minimal required version 8 12 9 13 ## [1.0.0] - 2019-05-07 … … 29 33 - Initial 30 34 31 [Unreleased]: https://gitlab.com/ID4me/id4me-rp-client-php/compare/master...1.0.0 35 [Unreleased]: https://gitlab.com/ID4me/id4me-rp-client-php/compare/master...1.1.0 36 [1.1.0]: https://gitlab.com/ID4me/id4me-rp-client-php/tags/1.1.0 32 37 [1.0.0]: https://gitlab.com/ID4me/id4me-rp-client-php/tags/1.0.0 33 38 [0.1.0]: https://gitlab.com/ID4me/id4me-rp-client-php/tags/0.1.0 -
id4me/trunk/vendor/id4me/id4me-rp/Dockerfile
r2082608 r2100367 1 1 # Dockerfile 2 FROM php:7. 2-apache2 FROM php:7.0-apache 3 3 4 4 RUN apt-get update \ 5 5 && apt-get install -y \ 6 6 git \ 7 libgmp-dev \8 7 curl \ 9 8 nano \ 10 gpm \11 9 unzip \ 12 10 netcat 13 11 14 12 RUN ln -s /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini 15 RUN docker-php-ext-install gmp16 13 RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer 17 14 -
id4me/trunk/vendor/id4me/id4me-rp/composer.json
r2082608 r2100367 7 7 "ext-json": "*", 8 8 "ext-openssl": "*", 9 "php": ">=7. 1",9 "php": ">=7.0", 10 10 "phpseclib/phpseclib": "^2.0" 11 11 }, … … 13 13 "guzzlehttp/guzzle": "^6.2", 14 14 "guzzlehttp/psr7": "1.5.*", 15 "phpunit/phpunit": "^ 8.0",15 "phpunit/phpunit": "^6", 16 16 "ext-readline": "*" 17 17 }, -
id4me/trunk/vendor/id4me/id4me-rp/src/Authorization.php
r2082608 r2100367 216 216 * @param HttpClient $httpClient 217 217 */ 218 public function setHttpClient(HttpClient $httpClient) : void218 public function setHttpClient(HttpClient $httpClient) 219 219 { 220 220 $this->httpClient = $httpClient; … … 226 226 * @param Validation $validation 227 227 */ 228 public function setValidation(Validation $validation) : void228 public function setValidation(Validation $validation) 229 229 { 230 230 $this->validation = $validation; -
id4me/trunk/vendor/id4me/id4me-rp/src/Model/Client.php
r2082608 r2100367 78 78 * @param string $issuer 79 79 */ 80 public function setIssuer(string $issuer) : void80 public function setIssuer(string $issuer) 81 81 { 82 82 $this->issuer = $issuer; … … 94 94 * @param string $clientName 95 95 */ 96 public function setClientName(string $clientName) : void96 public function setClientName(string $clientName) 97 97 { 98 98 $this->clientName = $clientName; … … 110 110 * @param string $clientId 111 111 */ 112 public function setClientId(string $clientId) : void112 public function setClientId(string $clientId) 113 113 { 114 114 $this->clientId = $clientId; … … 126 126 * @param string $clientSecret 127 127 */ 128 public function setClientSecret(string $clientSecret) : void128 public function setClientSecret(string $clientSecret) 129 129 { 130 130 $this->clientSecret = $clientSecret; … … 142 142 * @param int $clientExpirationTime 143 143 */ 144 public function setClientExpirationTime(int $clientExpirationTime) : void144 public function setClientExpirationTime(int $clientExpirationTime) 145 145 { 146 146 $this->clientExpirationTime = $clientExpirationTime; … … 158 158 * @param string $activeRedirectUri 159 159 */ 160 public function setActiveRedirectUri(string $activeRedirectUri) : void160 public function setActiveRedirectUri(string $activeRedirectUri) 161 161 { 162 162 $this->activeRedirectUri = $activeRedirectUri; … … 174 174 * @param array $redirectUris 175 175 */ 176 public function setRedirectUris(array $redirectUris) : void176 public function setRedirectUris(array $redirectUris) 177 177 { 178 178 $this->redirectUris = $redirectUris; -
id4me/trunk/vendor/id4me/id4me-rp/src/Model/OpenIdConfig.php
r2082608 r2100367 198 198 * @param string $issuer 199 199 */ 200 public function setIssuer(string $issuer) : void200 public function setIssuer(string $issuer) 201 201 { 202 202 $this->issuer = $issuer; … … 214 214 * @param string $jwksUri 215 215 */ 216 public function setJwksUri(string $jwksUri) : void216 public function setJwksUri(string $jwksUri) 217 217 { 218 218 $this->jwks_uri = $jwksUri; … … 230 230 * @param string $authorizationEndpoint 231 231 */ 232 public function setAuthorizationEndpoint(string $authorizationEndpoint) : void232 public function setAuthorizationEndpoint(string $authorizationEndpoint) 233 233 { 234 234 $this->authorization_endpoint = $authorizationEndpoint; … … 246 246 * @param string $tokenEndpoint 247 247 */ 248 public function setTokenEndpoint(string $tokenEndpoint) : void248 public function setTokenEndpoint(string $tokenEndpoint) 249 249 { 250 250 $this->token_endpoint = $tokenEndpoint; … … 262 262 * @param string $registrationEndpoint 263 263 */ 264 public function setRegistrationEndpoint(string $registrationEndpoint) : void264 public function setRegistrationEndpoint(string $registrationEndpoint) 265 265 { 266 266 $this->registration_endpoint = $registrationEndpoint; … … 278 278 * @param string $introspectionEndpoint 279 279 */ 280 public function setIntrospectionEndpoint(string $introspectionEndpoint) : void280 public function setIntrospectionEndpoint(string $introspectionEndpoint) 281 281 { 282 282 $this->introspection_endpoint = $introspectionEndpoint; … … 294 294 * @param string $revocationEndpoint 295 295 */ 296 public function setRevocationEndpoint(string $revocationEndpoint) : void296 public function setRevocationEndpoint(string $revocationEndpoint) 297 297 { 298 298 $this->revocation_endpoint = $revocationEndpoint; … … 310 310 * @param string $userInfoEndpoint 311 311 */ 312 public function setUserInfoEndpoint(string $userInfoEndpoint) : void312 public function setUserInfoEndpoint(string $userInfoEndpoint) 313 313 { 314 314 $this->userinfo_endpoint = $userInfoEndpoint; … … 326 326 * @param string $endSessionEndpoint 327 327 */ 328 public function setEndSessionEndpoint(string $endSessionEndpoint) : void328 public function setEndSessionEndpoint(string $endSessionEndpoint) 329 329 { 330 330 $this->end_session_endpoint = $endSessionEndpoint; … … 342 342 * @param array $scopesSupported 343 343 */ 344 public function setScopesSupported(array $scopesSupported) : void344 public function setScopesSupported(array $scopesSupported) 345 345 { 346 346 $this->scopes_supported = $scopesSupported; … … 358 358 * @param array $responseTypesSupported 359 359 */ 360 public function setResponseTypesSupported(array $responseTypesSupported) : void360 public function setResponseTypesSupported(array $responseTypesSupported) 361 361 { 362 362 $this->response_types_supported = $responseTypesSupported; … … 374 374 * @param array $responseModesSupported 375 375 */ 376 public function setResponseModesSupported(array $responseModesSupported) : void376 public function setResponseModesSupported(array $responseModesSupported) 377 377 { 378 378 $this->response_modes_supported = $responseModesSupported; … … 390 390 * @param array $grantTypesSupported 391 391 */ 392 public function setGrantTypesSupported(array $grantTypesSupported) : void392 public function setGrantTypesSupported(array $grantTypesSupported) 393 393 { 394 394 $this->grant_types_supported = $grantTypesSupported; … … 406 406 * @param array $codeChallengeMethodsSupported 407 407 */ 408 public function setCodeChallengeMethodsSupported(array $codeChallengeMethodsSupported) : void408 public function setCodeChallengeMethodsSupported(array $codeChallengeMethodsSupported) 409 409 { 410 410 $this->code_challenge_methods_supported = $codeChallengeMethodsSupported; … … 422 422 * @param array $tokenEndpointAuthMethodsSupported 423 423 */ 424 public function setTokenEndpointAuthMethodsSupported(array $tokenEndpointAuthMethodsSupported) : void424 public function setTokenEndpointAuthMethodsSupported(array $tokenEndpointAuthMethodsSupported) 425 425 { 426 426 $this->token_endpoint_auth_methods_supported = $tokenEndpointAuthMethodsSupported; … … 438 438 * @param array $tokenEndpointAuthSigningAlgValuesSupported 439 439 */ 440 public function setTokenEndpointAuthSigningAlgValuesSupported(array $tokenEndpointAuthSigningAlgValuesSupported) : void440 public function setTokenEndpointAuthSigningAlgValuesSupported(array $tokenEndpointAuthSigningAlgValuesSupported) 441 441 { 442 442 $this->token_endpoint_auth_signing_alg_values_supported = $tokenEndpointAuthSigningAlgValuesSupported; … … 454 454 * @param array $requestObjectSigningAlgValuesSupported 455 455 */ 456 public function setRequestObjectSigningAlgValuesSupported(array $requestObjectSigningAlgValuesSupported) : void456 public function setRequestObjectSigningAlgValuesSupported(array $requestObjectSigningAlgValuesSupported) 457 457 { 458 458 $this->request_object_signing_alg_values_supported = $requestObjectSigningAlgValuesSupported; … … 470 470 * @param array $uiLocalesSupported 471 471 */ 472 public function setUiLocalesSupported(array $uiLocalesSupported) : void472 public function setUiLocalesSupported(array $uiLocalesSupported) 473 473 { 474 474 $this->ui_locales_supported = $uiLocalesSupported; … … 486 486 * @param bool $requestParameterSupported 487 487 */ 488 public function setRequestParameterSupported(bool $requestParameterSupported) : void488 public function setRequestParameterSupported(bool $requestParameterSupported) 489 489 { 490 490 $this->request_parameter_supported = $requestParameterSupported; … … 502 502 * @param array $idTokenSigningAlgValuesSupported 503 503 */ 504 public function setIdTokenSigningAlgValuesSupported(array $idTokenSigningAlgValuesSupported) : void504 public function setIdTokenSigningAlgValuesSupported(array $idTokenSigningAlgValuesSupported) 505 505 { 506 506 $this->id_token_signing_alg_values_supported = $idTokenSigningAlgValuesSupported; … … 518 518 * @param array $idTokenEncryptionEncValuesSupported 519 519 */ 520 public function setIdTokenEncryptionEncValuesSupported(array $idTokenEncryptionEncValuesSupported) : void520 public function setIdTokenEncryptionEncValuesSupported(array $idTokenEncryptionEncValuesSupported) 521 521 { 522 522 $this->id_token_encryption_enc_values_supported = $idTokenEncryptionEncValuesSupported; … … 534 534 * @param array $userInfoSigningAlgValuesSupported 535 535 */ 536 public function setUserInfoSigningAlgValuesSupported(array $userInfoSigningAlgValuesSupported) : void536 public function setUserInfoSigningAlgValuesSupported(array $userInfoSigningAlgValuesSupported) 537 537 { 538 538 $this->userinfo_signing_alg_values_supported = $userInfoSigningAlgValuesSupported; … … 550 550 * @param array $userInfoEncryptionAlgValuesSupported 551 551 */ 552 public function setUserInfoEncryptionAlgValuesSupported(array $userInfoEncryptionAlgValuesSupported) : void552 public function setUserInfoEncryptionAlgValuesSupported(array $userInfoEncryptionAlgValuesSupported) 553 553 { 554 554 $this->userinfo_encryption_alg_values_supported = $userInfoEncryptionAlgValuesSupported; … … 566 566 * @param array $displayValuesSupported 567 567 */ 568 public function setDisplayValuesSupported(array $displayValuesSupported) : void568 public function setDisplayValuesSupported(array $displayValuesSupported) 569 569 { 570 570 $this->display_values_supported = $displayValuesSupported; … … 582 582 * @param array $claimTypesSupported 583 583 */ 584 public function setClaimTypesSupported(array $claimTypesSupported) : void584 public function setClaimTypesSupported(array $claimTypesSupported) 585 585 { 586 586 $this->claim_types_supported = $claimTypesSupported; … … 598 598 * @param array $claimsSupported 599 599 */ 600 public function setClaimsSupported(array $claimsSupported) : void600 public function setClaimsSupported(array $claimsSupported) 601 601 { 602 602 $this->claims_supported = $claimsSupported; … … 614 614 * @param bool $claimsParameterSupported 615 615 */ 616 public function setClaimsParameterSupported(bool $claimsParameterSupported) : void616 public function setClaimsParameterSupported(bool $claimsParameterSupported) 617 617 { 618 618 $this->claims_parameter_supported = $claimsParameterSupported; … … 630 630 * @param bool $frontChannelLogoutSupported 631 631 */ 632 public function setFrontChannelLogoutSupported(bool $frontChannelLogoutSupported) : void632 public function setFrontChannelLogoutSupported(bool $frontChannelLogoutSupported) 633 633 { 634 634 $this->front_channel_logout_supported = $frontChannelLogoutSupported; … … 646 646 * @param bool $backChannelLogoutSupported 647 647 */ 648 public function setBackChannelLogoutSupported(bool $backChannelLogoutSupported) : void648 public function setBackChannelLogoutSupported(bool $backChannelLogoutSupported) 649 649 { 650 650 $this->back_channel_logout_supported = $backChannelLogoutSupported; … … 662 662 * @param bool $requestUriParameterSupported 663 663 */ 664 public function setRequestUriParameterSupported(bool $requestUriParameterSupported) : void664 public function setRequestUriParameterSupported(bool $requestUriParameterSupported) 665 665 { 666 666 $this->request_uri_parameter_supported = $requestUriParameterSupported; … … 678 678 * @param bool $requireRequestUriRegistration 679 679 */ 680 public function setRequireRequestUriRegistration(bool $requireRequestUriRegistration) : void680 public function setRequireRequestUriRegistration(bool $requireRequestUriRegistration) 681 681 { 682 682 $this->require_request_uri_registration = $requireRequestUriRegistration; … … 694 694 * @param int $tlsClientCertificateBoundAccessTokens 695 695 */ 696 public function setTlsClientCertificateBoundAccessTokens(int $tlsClientCertificateBoundAccessTokens) : void696 public function setTlsClientCertificateBoundAccessTokens(int $tlsClientCertificateBoundAccessTokens) 697 697 { 698 698 $this->tls_client_certificate_bound_access_tokens = $tlsClientCertificateBoundAccessTokens; … … 710 710 * @param int $requestUriQuota 711 711 */ 712 public function setRequestUriQuota(int $requestUriQuota) : void712 public function setRequestUriQuota(int $requestUriQuota) 713 713 { 714 714 $this->request_uri_quota = $requestUriQuota; -
id4me/trunk/vendor/id4me/id4me-rp/src/Service.php
r2082608 r2100367 200 200 * @param Authorization $authorization 201 201 */ 202 public function setAuthorization(Authorization $authorization) : void202 public function setAuthorization(Authorization $authorization) 203 203 { 204 204 $this->authorization = $authorization; … … 210 210 * @param OpenIdConfigHelper $openConfigHelper 211 211 */ 212 public function setOpenConfigHelper(OpenIdConfigHelper $openConfigHelper) : void212 public function setOpenConfigHelper(OpenIdConfigHelper $openConfigHelper) 213 213 { 214 214 $this->openConfigHelper = $openConfigHelper; -
id4me/trunk/vendor/id4me/id4me-rp/src/Validation.php
r2082608 r2100367 37 37 * @throws InvalidAuthorityIssuerException if provided iss and issuer values are not equal 38 38 */ 39 public function validateISS(string $originIssuer, string $deliveredIssuer, bool $exactMatch = true) : void39 public function validateISS(string $originIssuer, string $deliveredIssuer, bool $exactMatch = true) 40 40 { 41 41 if ($exactMatch && ($originIssuer !== $deliveredIssuer)) { … … 63 63 IdToken $idToken, 64 64 array $jwksArray 65 ) : void{65 ) { 66 66 67 67 if ($algorithm != 'RS256') { … … 110 110 * @throws InvalidIDTokenException 111 111 */ 112 public function validateAudience($audience, $authorizedParty, string $clientId) : void112 public function validateAudience($audience, $authorizedParty, string $clientId) 113 113 { 114 114 $isValidAudience = false; … … 163 163 * @throws InvalidIDTokenException 164 164 */ 165 public function validateExpirationTime(string $expirationTime) : void165 public function validateExpirationTime(string $expirationTime) 166 166 { 167 167 $isValidExpirationTime = false; -
id4me/trunk/vendor/id4me/id4me-rp/tests/Mock/HttpClientGuzzle.php
r2082608 r2100367 8 8 class HttpClientGuzzle implements HttpClient { 9 9 10 public function get($url, $headers = [])10 public function get($url, array $headers = []) 11 11 { 12 12 $httpClient = new Client(); … … 17 17 } 18 18 19 public function post($url, $body, $headers = [])19 public function post($url, $body, array $headers = []) 20 20 { 21 21 $httpClient = new Client(); -
id4me/trunk/vendor/id4me/id4me-rp/tests/ValidationTest.php
r2082608 r2100367 26 26 IdToken $idToken, 27 27 array $jwksArray, 28 string $exceptionMessage 29 ): void { 30 31 if ($exceptionMessage) { 32 $this->expectException(InvalidIDTokenException::class); 33 $this->expectExceptionMessage($exceptionMessage); 34 } else { 35 $this->expectNotToPerformAssertions(); 28 string $expectedErrorMsg, 29 string $expectedExceptionType 30 ) { 31 $thrownExceptionMsg = ''; 32 $thrownExceptionType = ''; 33 34 try { 35 $validation = new Validation(); 36 $validation->validateIdTokenSignature( 37 $usedKey, 38 $algorithm, 39 $idToken, 40 $jwksArray 41 ); 42 } catch (Exception $e) { 43 $thrownExceptionMsg = $e->getMessage(); 44 $thrownExceptionType = get_class($e); 36 45 } 37 38 $validation = new Validation(); 39 $validation->validateIdTokenSignature( 40 $usedKey, 41 $algorithm, 42 $idToken, 43 $jwksArray 44 ); 46 $this->assertEquals($thrownExceptionMsg, $expectedErrorMsg); 47 $this->assertEquals($thrownExceptionType, $expectedExceptionType); 45 48 } 46 49 … … 61 64 $idToken, 62 65 $jwks, 66 '', 63 67 '' 64 68 ], … … 68 72 new IdToken('t.e.s.t'), 69 73 $jwks, 70 Validation::INVALID_ID_TOKEN_SIGNATURE_EXCEPTION 74 Validation::INVALID_ID_TOKEN_SIGNATURE_EXCEPTION, 75 get_class(new InvalidIDTokenException) 71 76 ], 72 77 [ … … 75 80 $idToken, 76 81 $jwks, 77 Validation::INVALID_ID_TOKEN_JWS_KEYSET_KEY_NOT_FOUND 82 Validation::INVALID_ID_TOKEN_JWS_KEYSET_KEY_NOT_FOUND, 83 get_class(new InvalidIDTokenException) 78 84 ], 79 85 [ … … 82 88 $idToken, 83 89 $jwks, 84 sprintf(Validation::INVALID_ID_TOKEN_ALGORITHM_EXCEPTION, 'wrong-algo') 90 sprintf(Validation::INVALID_ID_TOKEN_ALGORITHM_EXCEPTION, 'wrong-algo'), 91 get_class(new InvalidIDTokenException) 85 92 ] 86 93 ]; … … 103 110 string $deliveredIssuer, 104 111 bool $exactMatch, 105 bool $throwsException 106 ): void { 107 108 if ($throwsException) { 109 $this->expectException(InvalidAuthorityIssuerException::class); 110 $this->expectExceptionMessage(Validation::INVALID_ID_TOKEN_ISSUER_EXCEPTION); 111 } else { 112 $this->expectNotToPerformAssertions(); 112 string $expectedErrorMsg, 113 string $expectedExceptionType 114 ) { 115 $thrownExceptionMsg = ''; 116 $thrownExceptionType = ''; 117 118 try { 119 $validation = new Validation(); 120 $validation->validateISS( 121 $originIssuer, 122 $deliveredIssuer, 123 $exactMatch 124 ); 125 } catch (Exception $e) { 126 $thrownExceptionMsg = $e->getMessage(); 127 $thrownExceptionType = get_class($e); 113 128 } 114 115 $validation = new Validation(); 116 $validation->validateISS( 117 $originIssuer, 118 $deliveredIssuer, 119 $exactMatch 120 ); 129 $this->assertEquals($thrownExceptionMsg, $expectedErrorMsg); 130 $this->assertEquals($thrownExceptionType, $expectedExceptionType); 121 131 } 122 132 … … 133 143 'https://id.test.denic.de', 134 144 true, 135 false 145 '', 146 '' 136 147 ], 137 148 [ … … 139 150 'https://id.test.denic.de', 140 151 false, 141 false 152 '', 153 '' 142 154 ], 143 155 [ … … 145 157 'id.test.denic.de', 146 158 true, 147 true 159 Validation::INVALID_ID_TOKEN_ISSUER_EXCEPTION, 160 get_class(new InvalidAuthorityIssuerException) 148 161 ], 149 162 [ … … 151 164 'https://id.test.denic.com', 152 165 true, 153 true 166 Validation::INVALID_ID_TOKEN_ISSUER_EXCEPTION, 167 get_class(new InvalidAuthorityIssuerException) 154 168 ] 155 169 ]; … … 172 186 string $authorizedParty, 173 187 string $clientId, 174 bool $throwsException 175 ): void { 176 177 if ($throwsException) { 178 $this->expectException(InvalidIDTokenException::class); 179 $this->expectExceptionMessage(Validation::INVALID_ID_TOKEN_AUDIENCE_EXCEPTION); 180 } else { 181 $this->expectNotToPerformAssertions(); 188 string $expectedErrorMsg, 189 string $expectedExceptionType 190 ) { 191 $thrownExceptionMsg = ''; 192 $thrownExceptionType = ''; 193 try { 194 $validation = new Validation(); 195 $validation->validateAudience( 196 $audience, 197 $authorizedParty, 198 $clientId 199 ); 200 } catch (Exception $e) { 201 $thrownExceptionMsg = $e->getMessage(); 202 $thrownExceptionType = get_class($e); 182 203 } 183 184 $validation = new Validation(); 185 $validation->validateAudience( 186 $audience, 187 $authorizedParty, 188 $clientId 189 ); 204 $this->assertEquals($thrownExceptionMsg, $expectedErrorMsg); 205 $this->assertEquals($thrownExceptionType, $expectedExceptionType); 190 206 } 191 207 … … 202 218 '', 203 219 '7ftj6vw545suk', 204 false 205 ], 206 [ 207 '7ftj6vw545suk', 208 '7ftj6vw545suk', 209 '7ftj6vw545suk', 210 false 220 '', 221 '' 222 ], 223 [ 224 '7ftj6vw545suk', 225 '7ftj6vw545suk', 226 '7ftj6vw545suk', 227 '', 228 '' 211 229 ], 212 230 [ … … 214 232 '', 215 233 'wrong-client-id', 216 true 234 Validation::INVALID_ID_TOKEN_AUDIENCE_EXCEPTION, 235 get_class(new InvalidIDTokenException) 217 236 ], 218 237 [ … … 220 239 '7ftj6vw545suk', 221 240 '7ftj6vw545suk', 222 false 241 '', 242 '' 223 243 ], 224 244 [ … … 226 246 '', 227 247 '7ftj6vw545suk', 228 true 229 ], 230 [ 231 '', 232 '7ftj6vw545suk', 233 '7ftj6vw545suk', 234 true 248 Validation::INVALID_ID_TOKEN_AUDIENCE_EXCEPTION, 249 get_class(new InvalidIDTokenException) 250 ], 251 [ 252 '', 253 '7ftj6vw545suk', 254 '7ftj6vw545suk', 255 Validation::INVALID_ID_TOKEN_AUDIENCE_EXCEPTION, 256 get_class(new InvalidIDTokenException) 235 257 ], 236 258 [ … … 238 260 'vwsvw5', 239 261 '7ftj6vw545suk', 240 true 262 Validation::INVALID_ID_TOKEN_AUDIENCE_EXCEPTION, 263 get_class(new InvalidIDTokenException) 241 264 ] 242 265 ]; … … 255 278 public function testValidateIDTokenExpirationTime( 256 279 string $expirationTime, 257 bool $throwsException 258 ): void { 259 260 if ($throwsException) { 261 $this->expectException(InvalidIDTokenException::class); 262 $this->expectExceptionMessage(Validation::INVALID_ID_TOKEN_EXPIRATION_TIME_EXCEPTION); 263 } else { 264 $this->expectNotToPerformAssertions(); 280 string $expectedErrorMsg, 281 string $expectedExceptionType 282 ) { 283 $thrownExceptionMsg = ''; 284 $thrownExceptionType = ''; 285 try { 286 $validation = new Validation(); 287 $validation->validateExpirationTime( 288 $expirationTime 289 ); 290 } catch (Exception $e) { 291 $thrownExceptionMsg = $e->getMessage(); 292 $thrownExceptionType = get_class($e); 265 293 } 266 267 $validation = new Validation(); 268 $validation->validateExpirationTime($expirationTime); 294 $this->assertEquals($thrownExceptionMsg, $expectedErrorMsg); 295 $this->assertEquals($thrownExceptionType, $expectedExceptionType); 269 296 } 270 297 … … 279 306 [ 280 307 (string) mktime(10, 30, 30, 1, 1, 2050), 281 false 282 ], 283 [ 284 '', 285 true 308 '', 309 '' 310 ], 311 [ 312 '', 313 Validation::INVALID_ID_TOKEN_EXPIRATION_TIME_EXCEPTION, 314 get_class(new InvalidIDTokenException) 315 286 316 ], 287 317 [ 288 318 (string) mktime(10, 30, 30, 1, 1, 1950), 289 true 319 Validation::INVALID_ID_TOKEN_EXPIRATION_TIME_EXCEPTION, 320 get_class(new InvalidIDTokenException) 290 321 ] 291 322 ]; … … 323 354 324 355 // Header data value test 325 $this->assert IsArray($idToken->getDecodedHeader());356 $this->assertTrue(is_array($idToken->getDecodedHeader())); 326 357 $this->assertSame( 327 358 $idToken->getDecodedHeader(), … … 333 364 334 365 // Body data value test 335 $this->assert IsArray($idToken->getDecodedBody());366 $this->assertTrue(is_array($idToken->getDecodedBody())); 336 367 $this->assertSame( 337 368 $idToken->getDecodedBody(),
Note: See TracChangeset
for help on using the changeset viewer.