├── .github └── workflows │ ├── code-style.yml │ ├── phpunit.yml │ ├── publish-to-redaxo.yml │ └── rexstan.yml ├── .gitignore ├── .php-cs-fixer.dist.php ├── .tools ├── bootstrap.php └── rexstan.php ├── CHANGELOG.md ├── LICENSE.md ├── README.md ├── assets └── ycom_backend.js ├── boot.php ├── composer.json ├── composer.lock ├── docs ├── 01_intro.md ├── 02_settings.md ├── 03_login_logout_profile_register.md ├── 04_navigations.md ├── 05_passwords.md ├── 06_user_groups.md ├── 07_plugin_media_auth.md ├── 08_extern_auth.md ├── 09_tricks.md ├── 10_otp.md └── 11_tokens.md ├── install.php ├── install └── tablesets │ └── yform_user.json ├── lang ├── de_de.lang ├── en_gb.lang ├── es_es.lang ├── pt_br.lang └── sv_se.lang ├── lib ├── ycom.php ├── ycom_config.php ├── ycom_log.php ├── ycom_user.php └── yform │ └── value │ ├── ycom_user.php │ └── ycom_user_init.php ├── package.yml ├── pages ├── docs.php └── index.php ├── phpunit.xml.dist ├── plugins ├── auth │ ├── assets │ │ ├── clipboard-copy-element.js │ │ ├── qrious.min.js │ │ └── styles.css │ ├── boot.php │ ├── install.php │ ├── install │ │ ├── cas.php │ │ ├── oauth2.php │ │ └── saml.php │ ├── lang │ │ ├── de_de.lang │ │ ├── en_gb.lang │ │ ├── es_es.lang │ │ ├── pt_br.lang │ │ └── sv_se.lang │ ├── lib │ │ ├── injections │ │ │ ├── abstract.php │ │ │ ├── otp.php │ │ │ ├── passwordchange.php │ │ │ └── termsofuse.php │ │ ├── otp │ │ │ ├── exception.php │ │ │ ├── method_email.php │ │ │ ├── method_interface.php │ │ │ ├── method_totp.php │ │ │ ├── password.php │ │ │ └── password_config.php │ │ ├── ycom_auth.php │ │ ├── ycom_auth_rules.php │ │ ├── ycom_user_session.php │ │ ├── ycom_user_token.php │ │ └── yform │ │ │ ├── action │ │ │ └── ycom_auth_db.php │ │ │ ├── trait_value_auth_extern.php │ │ │ ├── validate │ │ │ ├── ycom_auth.php │ │ │ ├── ycom_auth_login.php │ │ │ └── ycom_auth_password.php │ │ │ └── value │ │ │ ├── ycom_auth_cas.php │ │ │ ├── ycom_auth_load_user.php │ │ │ ├── ycom_auth_logout.php │ │ │ ├── ycom_auth_oauth2.php │ │ │ ├── ycom_auth_otp.php │ │ │ ├── ycom_auth_password.php │ │ │ ├── ycom_auth_returnto.php │ │ │ ├── ycom_auth_saml.php │ │ │ └── ycom_user_token.php │ ├── package.yml │ ├── pages │ │ ├── content.ycom_auth.php │ │ ├── index.php │ │ ├── log.php │ │ ├── sessions.php │ │ ├── settings.php │ │ ├── system.log.ycom_user.php │ │ └── tokens.php │ ├── update.php │ └── ytemplates │ │ └── bootstrap │ │ ├── value.ycom_auth_extern.tpl.php │ │ ├── value.ycom_auth_otp_setup.tpl.php │ │ ├── value.ycom_auth_otp_verify.tpl.php │ │ ├── value.ycom_auth_saml.tpl.php │ │ └── value.ycom_password.tpl.php ├── group │ ├── boot.php │ ├── install.php │ ├── lang │ │ ├── de_de.lang │ │ ├── en_gb.lang │ │ ├── es_es.lang │ │ ├── pt_br.lang │ │ └── sv_se.lang │ ├── lib │ │ └── ycom_group.php │ ├── package.yml │ ├── uninstall.php │ └── update.php └── media_auth │ ├── boot.php │ ├── install.php │ ├── lang │ ├── de_de.lang │ ├── en_gb.lang │ ├── es_es.lang │ └── sv_se.lang │ ├── lib │ ├── ycom_media_auth.php │ └── ycom_media_auth_rules.php │ ├── package.yml │ ├── pages │ ├── index.php │ └── settings.php │ ├── uninstall.php │ └── update.php ├── tests └── unit │ └── login_test.php ├── uninstall.php ├── update.php └── vendor ├── apereo └── phpcas │ ├── CAS.php │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── composer.json │ └── source │ ├── CAS.php │ └── CAS │ ├── AuthenticationException.php │ ├── Autoload.php │ ├── Client.php │ ├── CookieJar.php │ ├── Exception.php │ ├── GracefullTerminationException.php │ ├── InvalidArgumentException.php │ ├── Languages │ ├── Catalan.php │ ├── ChineseSimplified.php │ ├── English.php │ ├── French.php │ ├── Galego.php │ ├── German.php │ ├── Greek.php │ ├── Japanese.php │ ├── LanguageInterface.php │ ├── Portuguese.php │ └── Spanish.php │ ├── OutOfSequenceBeforeAuthenticationCallException.php │ ├── OutOfSequenceBeforeClientException.php │ ├── OutOfSequenceBeforeProxyException.php │ ├── OutOfSequenceException.php │ ├── PGTStorage │ ├── AbstractStorage.php │ ├── Db.php │ └── File.php │ ├── ProxiedService.php │ ├── ProxiedService │ ├── Abstract.php │ ├── Exception.php │ ├── Http.php │ ├── Http │ │ ├── Abstract.php │ │ ├── Get.php │ │ └── Post.php │ ├── Imap.php │ └── Testable.php │ ├── ProxyChain.php │ ├── ProxyChain │ ├── AllowedList.php │ ├── Any.php │ ├── Interface.php │ └── Trusted.php │ ├── ProxyTicketException.php │ ├── Request │ ├── AbstractRequest.php │ ├── CurlMultiRequest.php │ ├── CurlRequest.php │ ├── Exception.php │ ├── MultiRequestInterface.php │ └── RequestInterface.php │ ├── ServiceBaseUrl │ ├── AllowedListDiscovery.php │ ├── Base.php │ ├── Interface.php │ └── Static.php │ ├── Session │ └── PhpSession.php │ └── TypeMismatchException.php ├── autoload.php ├── composer ├── ClassLoader.php ├── InstalledVersions.php ├── LICENSE ├── autoload_classmap.php ├── autoload_files.php ├── autoload_namespaces.php ├── autoload_psr4.php ├── autoload_real.php ├── autoload_static.php ├── installed.json ├── installed.php └── platform_check.php ├── guzzlehttp ├── guzzle │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── UPGRADING.md │ ├── composer.json │ └── src │ │ ├── BodySummarizer.php │ │ ├── BodySummarizerInterface.php │ │ ├── Client.php │ │ ├── ClientInterface.php │ │ ├── ClientTrait.php │ │ ├── Cookie │ │ ├── CookieJar.php │ │ ├── CookieJarInterface.php │ │ ├── FileCookieJar.php │ │ ├── SessionCookieJar.php │ │ └── SetCookie.php │ │ ├── Exception │ │ ├── BadResponseException.php │ │ ├── ClientException.php │ │ ├── ConnectException.php │ │ ├── GuzzleException.php │ │ ├── InvalidArgumentException.php │ │ ├── RequestException.php │ │ ├── ServerException.php │ │ ├── TooManyRedirectsException.php │ │ └── TransferException.php │ │ ├── Handler │ │ ├── CurlFactory.php │ │ ├── CurlFactoryInterface.php │ │ ├── CurlHandler.php │ │ ├── CurlMultiHandler.php │ │ ├── EasyHandle.php │ │ ├── HeaderProcessor.php │ │ ├── MockHandler.php │ │ ├── Proxy.php │ │ └── StreamHandler.php │ │ ├── HandlerStack.php │ │ ├── MessageFormatter.php │ │ ├── MessageFormatterInterface.php │ │ ├── Middleware.php │ │ ├── Pool.php │ │ ├── PrepareBodyMiddleware.php │ │ ├── RedirectMiddleware.php │ │ ├── RequestOptions.php │ │ ├── RetryMiddleware.php │ │ ├── TransferStats.php │ │ ├── Utils.php │ │ ├── functions.php │ │ └── functions_include.php ├── promises │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── composer.json │ └── src │ │ ├── AggregateException.php │ │ ├── CancellationException.php │ │ ├── Coroutine.php │ │ ├── Create.php │ │ ├── Each.php │ │ ├── EachPromise.php │ │ ├── FulfilledPromise.php │ │ ├── Is.php │ │ ├── Promise.php │ │ ├── PromiseInterface.php │ │ ├── PromisorInterface.php │ │ ├── RejectedPromise.php │ │ ├── RejectionException.php │ │ ├── TaskQueue.php │ │ ├── TaskQueueInterface.php │ │ └── Utils.php └── psr7 │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── composer.json │ └── src │ ├── AppendStream.php │ ├── BufferStream.php │ ├── CachingStream.php │ ├── DroppingStream.php │ ├── Exception │ └── MalformedUriException.php │ ├── FnStream.php │ ├── Header.php │ ├── HttpFactory.php │ ├── InflateStream.php │ ├── LazyOpenStream.php │ ├── LimitStream.php │ ├── Message.php │ ├── MessageTrait.php │ ├── MimeType.php │ ├── MultipartStream.php │ ├── NoSeekStream.php │ ├── PumpStream.php │ ├── Query.php │ ├── Request.php │ ├── Response.php │ ├── Rfc7230.php │ ├── ServerRequest.php │ ├── Stream.php │ ├── StreamDecoratorTrait.php │ ├── StreamWrapper.php │ ├── UploadedFile.php │ ├── Uri.php │ ├── UriComparator.php │ ├── UriNormalizer.php │ ├── UriResolver.php │ └── Utils.php ├── league └── oauth2-client │ ├── LICENSE │ ├── README.md │ ├── composer.json │ └── src │ ├── Grant │ ├── AbstractGrant.php │ ├── AuthorizationCode.php │ ├── ClientCredentials.php │ ├── Exception │ │ └── InvalidGrantException.php │ ├── GrantFactory.php │ ├── Password.php │ └── RefreshToken.php │ ├── OptionProvider │ ├── HttpBasicAuthOptionProvider.php │ ├── OptionProviderInterface.php │ └── PostAuthOptionProvider.php │ ├── Provider │ ├── AbstractProvider.php │ ├── Exception │ │ └── IdentityProviderException.php │ ├── GenericProvider.php │ ├── GenericResourceOwner.php │ └── ResourceOwnerInterface.php │ ├── Token │ ├── AccessToken.php │ ├── AccessTokenInterface.php │ └── ResourceOwnerAccessTokenInterface.php │ └── Tool │ ├── ArrayAccessorTrait.php │ ├── BearerAuthorizationTrait.php │ ├── GuardedPropertyTrait.php │ ├── MacAuthorizationTrait.php │ ├── ProviderRedirectTrait.php │ ├── QueryBuilderTrait.php │ ├── RequestFactory.php │ └── RequiredParameterTrait.php ├── onelogin └── php-saml │ ├── .github │ └── workflows │ │ └── php-package.yml │ ├── CHANGELOG │ ├── LICENSE │ ├── README.md │ ├── _toolkit_loader.php │ ├── advanced_settings_example.php │ ├── certs │ └── README │ ├── composer.json │ ├── phpunit.xml │ ├── settings_example.php │ └── src │ └── Saml2 │ ├── Auth.php │ ├── AuthnRequest.php │ ├── Constants.php │ ├── Error.php │ ├── IdPMetadataParser.php │ ├── LogoutRequest.php │ ├── LogoutResponse.php │ ├── Metadata.php │ ├── Response.php │ ├── Settings.php │ ├── Utils.php │ ├── ValidationError.php │ ├── schemas │ ├── saml-schema-assertion-2.0.xsd │ ├── saml-schema-authn-context-2.0.xsd │ ├── saml-schema-authn-context-types-2.0.xsd │ ├── saml-schema-metadata-2.0.xsd │ ├── saml-schema-protocol-2.0.xsd │ ├── sstc-metadata-attr.xsd │ ├── sstc-saml-attribute-ext.xsd │ ├── sstc-saml-metadata-algsupport-v1.0.xsd │ ├── sstc-saml-metadata-ui-v1.0.xsd │ ├── xenc-schema.xsd │ ├── xml.xsd │ └── xmldsig-core-schema.xsd │ └── version.json ├── paragonie ├── constant_time_encoding │ ├── LICENSE.txt │ ├── README.md │ ├── composer.json │ └── src │ │ ├── Base32.php │ │ ├── Base32Hex.php │ │ ├── Base64.php │ │ ├── Base64DotSlash.php │ │ ├── Base64DotSlashOrdered.php │ │ ├── Base64UrlSafe.php │ │ ├── Binary.php │ │ ├── EncoderInterface.php │ │ ├── Encoding.php │ │ ├── Hex.php │ │ └── RFC4648.php └── random_compat │ ├── LICENSE │ ├── build-phar.sh │ ├── composer.json │ ├── dist │ ├── random_compat.phar.pubkey │ └── random_compat.phar.pubkey.asc │ ├── lib │ └── random.php │ ├── other │ └── build_phar.php │ ├── psalm-autoload.php │ └── psalm.xml ├── psr ├── clock │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── composer.json │ └── src │ │ └── ClockInterface.php ├── http-client │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── composer.json │ └── src │ │ ├── ClientExceptionInterface.php │ │ ├── ClientInterface.php │ │ ├── NetworkExceptionInterface.php │ │ └── RequestExceptionInterface.php └── http-factory │ ├── LICENSE │ ├── README.md │ ├── composer.json │ └── src │ ├── RequestFactoryInterface.php │ ├── ResponseFactoryInterface.php │ ├── ServerRequestFactoryInterface.php │ ├── StreamFactoryInterface.php │ ├── UploadedFileFactoryInterface.php │ └── UriFactoryInterface.php ├── ralouphie └── getallheaders │ ├── LICENSE │ ├── README.md │ ├── composer.json │ └── src │ └── getallheaders.php ├── robrichards └── xmlseclibs │ ├── CHANGELOG.txt │ ├── LICENSE │ ├── README.md │ ├── composer.json │ ├── src │ ├── Utils │ │ └── XPath.php │ ├── XMLSecEnc.php │ ├── XMLSecurityDSig.php │ └── XMLSecurityKey.php │ └── xmlseclibs.php ├── spomky-labs └── otphp │ ├── LICENSE │ ├── README.md │ ├── SECURITY.md │ ├── composer.json │ └── src │ ├── Factory.php │ ├── FactoryInterface.php │ ├── HOTP.php │ ├── HOTPInterface.php │ ├── InternalClock.php │ ├── OTP.php │ ├── OTPInterface.php │ ├── ParameterTrait.php │ ├── TOTP.php │ ├── TOTPInterface.php │ └── Url.php └── symfony └── deprecation-contracts ├── CHANGELOG.md ├── LICENSE ├── README.md ├── composer.json └── function.php /.github/workflows/code-style.yml: -------------------------------------------------------------------------------- 1 | name: PHP-CS-Fixer 2 | 3 | on: 4 | push: 5 | branches: [ master, main ] 6 | pull_request: 7 | branches: [ master, main ] 8 | 9 | permissions: 10 | contents: read 11 | 12 | jobs: 13 | code-style: 14 | 15 | runs-on: ubuntu-latest 16 | permissions: 17 | contents: write # for Git to git apply 18 | 19 | steps: 20 | - uses: actions/checkout@v3 21 | 22 | - name: Setup PHP 23 | uses: shivammathur/setup-php@v2 24 | with: 25 | php-version: '8.1' 26 | extensions: gd, intl, pdo_mysql 27 | coverage: none # disable xdebug, pcov 28 | 29 | # install dependencies from composer.json 30 | - name: Install test dependencies 31 | env: 32 | COMPOSER: composer.json 33 | run: composer install --prefer-dist --no-progress 34 | 35 | # run php-cs-fixer 36 | - name: Run PHP CS Fixer 37 | run: composer cs-dry 38 | 39 | # commit and push fixed files 40 | # - uses: stefanzweifel/git-auto-commit-action@v4 41 | # with: 42 | # commit_message: Apply php-cs-fixer changes 43 | -------------------------------------------------------------------------------- /.github/workflows/publish-to-redaxo.yml: -------------------------------------------------------------------------------- 1 | name: Publish release 2 | 3 | on: 4 | release: 5 | types: 6 | - published 7 | 8 | jobs: 9 | redaxo_publish: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v3 13 | - uses: shivammathur/setup-php@v2 14 | with: 15 | php-version: "8.2" 16 | - uses: ramsey/composer-install@v2 17 | with: 18 | composer-options: "--no-dev" 19 | - uses: FriendsOfREDAXO/installer-action@v1 20 | with: 21 | myredaxo-username: ${{ secrets.MYREDAXO_USERNAME }} 22 | myredaxo-api-key: ${{ secrets.MYREDAXO_API_KEY }} 23 | description: ${{ github.event.release.body }} 24 | 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .phpunit.result.cache 2 | .php-cs-fixer.cache 3 | -------------------------------------------------------------------------------- /.php-cs-fixer.dist.php: -------------------------------------------------------------------------------- 1 | in(__DIR__) 7 | ; 8 | 9 | return (new Redaxo\PhpCsFixerConfig\Config()) 10 | ->setFinder($finder) 11 | ; 12 | -------------------------------------------------------------------------------- /.tools/bootstrap.php: -------------------------------------------------------------------------------- 1 | Hinweis: Die einzelnen Features können losgelöst voneinander verwendet werden. 18 | 19 | ![Screenshot](https://raw.githubusercontent.com/yakamara/redaxo_ycom/assets/ycom_01.png) 20 | 21 | Installation 22 | ------------ 23 | 24 | * Ins Backend einloggen und mit dem Installer installieren. 25 | -------------------------------------------------------------------------------- /assets/ycom_backend.js: -------------------------------------------------------------------------------- 1 | $(document).on('rex:ready', function () { 2 | 3 | // YCom-Artikel Rechte 4 | $('#yform-ycom_auth-perm-ycom_auth_type select,#yform-ycom_auth-perm-ycom_group_type select').on('change', function() { 5 | if($('#yform-ycom_auth-perm-ycom_auth_type select option:selected').val() !== "1") { 6 | $('#yform-ycom_auth-perm-ycom_group_type').hide(); 7 | $('#yform-ycom_auth-perm-ycom_groups').hide(); 8 | } else { 9 | $('#yform-ycom_auth-perm-ycom_group_type').show(); 10 | let group_type = $('#yform-ycom_auth-perm-ycom_group_type option:selected').val(); 11 | if(group_type === "1" || group_type === "2") { 12 | $('#yform-ycom_auth-perm-ycom_groups').show(); 13 | } else { 14 | $('#yform-ycom_auth-perm-ycom_groups').hide(); 15 | } 16 | } 17 | }); 18 | $('#yform-ycom_auth-perm-ycom_auth_type select').trigger('change'); 19 | 20 | // Medienpool Rechte 21 | $('select[name="ycom_auth_type"],select[name="ycom_group_type"]').on('change', function() { 22 | 23 | if($('select[name="ycom_auth_type"] option:selected').val() !== "1") { 24 | $('select[name="ycom_group_type"]').closest('.form-group').hide(); 25 | $('select[name="ycom_groups[]"]').closest('.form-group').hide(); 26 | } else { 27 | $('select[name="ycom_group_type"]').closest('.form-group').show(); 28 | let group_type_selected = $('select[name="ycom_group_type"] option:selected').val(); 29 | if(group_type_selected === "1" || group_type_selected === "2") { 30 | $('select[name="ycom_groups[]"]').closest('.form-group').show(); 31 | } else { 32 | $('select[name="ycom_groups[]"]').closest('.form-group').hide(); 33 | } 34 | } 35 | }); 36 | $('select[name="ycom_auth_type"]').trigger('change'); 37 | }); 38 | -------------------------------------------------------------------------------- /boot.php: -------------------------------------------------------------------------------- 1 | isAvailable()) { 17 | // YForm <= 5 18 | $pages = $plugin->getProperty('pages'); 19 | $ycom_tables = rex_ycom::getTables(); 20 | if (isset($pages) && is_array($pages)) { 21 | foreach ($pages as $page) { 22 | if (in_array($page->getKey(), $ycom_tables, true)) { 23 | $page->setBlock('ycom'); 24 | // $page->setRequiredPermissions('ycom[]'); 25 | } 26 | } 27 | } 28 | } else { 29 | // YForm >= 5 30 | $pages = $addon->getProperty('pages'); 31 | $ycom_tables = rex_ycom::getTables(); 32 | if (isset($pages) && is_array($pages)) { 33 | foreach ($pages as $page) { 34 | if (in_array($page->getKey(), $ycom_tables, true)) { 35 | $page->setBlock('ycom'); 36 | // $page->setRequiredPermissions('ycom[]'); 37 | } 38 | } 39 | } 40 | } 41 | }); 42 | } 43 | 44 | rex_ycom::addTable(rex::getTablePrefix() . 'ycom_user'); 45 | rex_yform_manager_dataset::setModelClass(rex::getTablePrefix() . 'ycom_user', rex_ycom_user::class); 46 | 47 | if (rex::isBackend() && ('index.php?page=content/edit' === rex_url::currentBackendPage() || 'mediapool' === rex_be_controller::getCurrentPagePart(1))) { 48 | rex_view::addJsFile($this->getAssetsUrl('ycom_backend.js')); 49 | } 50 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "yakamara/ycom", 3 | "require": { 4 | "onelogin/php-saml": "^3", 5 | "apereo/phpcas": "^1", 6 | "league/oauth2-client": "^2", 7 | "psr/log": "^1", 8 | "spomky-labs/otphp": "^11.0" 9 | }, 10 | "replace": { 11 | "psr/container": "*", 12 | "psr/http-message": "*", 13 | "psr/log": "*" 14 | }, 15 | "require-dev": { 16 | "redaxo/php-cs-fixer-config": "^2.0", 17 | "friendsofphp/php-cs-fixer": "^3.14", 18 | "phpunit/phpunit": "^9.5" 19 | }, 20 | "config": { 21 | "platform": { 22 | "php": "8.1.13" 23 | } 24 | }, 25 | "scripts": { 26 | "cs-dry": "php-cs-fixer fix -v --ansi --dry-run --config=.php-cs-fixer.dist.php", 27 | "cs-fix": "php-cs-fixer fix -v --ansi --config=.php-cs-fixer.dist.php", 28 | "unit-test": "phpunit --testdox" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/04_navigations.md: -------------------------------------------------------------------------------- 1 | # Navigationen 2 | 3 | ## Benutzung der REDAXO Navigation 4 | 5 | Damit die Userberechtigungen in der Navigation berücksichtigt werden muss die REDAXO Klasse rex_navigation::factory ergänzt werden. 6 | 7 | ```php 8 | $nav = rex_navigation::factory(); 9 | $nav->addCallback('rex_ycom_auth::articleIsPermitted'); 10 | $nav->show(0, 1, TRUE, TRUE); 11 | ``` 12 | 13 | > **Hinweis:** Die Ausgabe der Navigation kann angepasst und um Parameter erweitert werden. Details siehe in der Doku: 14 | 15 | > **Hinweis:** Die Klasse `rex_ycom_navigation::factory();` existiert seit Version 3 nicht mehr. 16 | 17 | ## Meta-User-Navigation 18 | 19 | Beispiel für die Entwicklung einer Meta-User-Navigation: 20 | 21 | ```php 22 | $login_article_id = rex_ycom_config::get('article_id_login'); 23 | $logout_article_id = rex_ycom_config::get('article_id_logout'); 24 | 25 | // TODO: please change 26 | $profile_article_id = 1; 27 | $register_article_id = 1; 28 | 29 | $ycom_user = rex_ycom_auth::getUser(); 30 | if ($ycom_user) { 31 | echo ' 32 |
33 | 41 |
'; 42 | } else { 43 | echo ' 44 |
45 | 53 |
'; 54 | } 55 | ``` 56 | -------------------------------------------------------------------------------- /install.php: -------------------------------------------------------------------------------- 1 | delete 21 | $pluginDocs = __DIR__ . '/plugins/docs'; 22 | if (file_exists($pluginDocs)) { 23 | rex_dir::delete($pluginDocs); 24 | } 25 | 26 | foreach ($this->getInstalledPlugins() as $plugin) { 27 | // use path relative to __DIR__ to get correct path in update temp dir 28 | $file = __DIR__ . '/plugins/' . $plugin->getName() . '/install.php'; 29 | 30 | if (file_exists($file)) { 31 | $plugin->includeFile($file); 32 | } 33 | } 34 | 35 | // rex_yform_manager_table_api::generateTablesAndFields(); 36 | 37 | rex_delete_cache(); 38 | -------------------------------------------------------------------------------- /lang/pt_br.lang: -------------------------------------------------------------------------------- 1 | ycom_perm = Permissões comunitárias 2 | 3 | ycom_page_perm = Página de permissões comunitárias 4 | 5 | navigation_ycom = Comunidade 6 | ycom_title = Comunidade: configurações 7 | ycom_navi_title = Configurações 8 | 9 | ycom_main_title = Informações 10 | ycom_info = Readme 11 | ycom_info_title = Informações úteis para trabalhar com o AddOn comunidade 12 | ycom_manual = Manual / Exemplos 13 | ycom_manual_title = Manual / Exemplos 14 | ycom_changelog = Mudar log 15 | ycom_changelog_title = Mudar log 16 | ycom_license = Licença 17 | ycom_license_title = Licença 18 | ycom_overview = Visão geral 19 | ycom_user_management = Gestão de usuário 20 | ycom_field_management = Editar campos 21 | 22 | ycom_user = Usuário 23 | yform_ycom_user = Usuário de comunidade 24 | rex_ycom_user = Usuário de comunidade 25 | 26 | email = E-mail 27 | status = Status 28 | firstname = Primeiro Nome 29 | activation_key = Chave de ativação 30 | session_key = Chave da seção 31 | last_login_time = Último acesso 32 | last_action_time = Última ação 33 | login_failed = Logins falhos 34 | login_tries = Tentativas de login 35 | 36 | ycom_login_tries_info = 10 tentativas falhas de logon causam o bloqueamente do usuário. 37 | 38 | ycom_account_inactive = Acesso desativado 39 | ycom_account_requested = Acesso requisitado 40 | ycom_account_active = Acesso ativo 41 | 42 | ycom_status = Status 43 | 44 | ycom_perm_type = Permissões da página 45 | 46 | ycom_perm_extends = Adotar categoria mais ampla, caso contrário acessível a todos os usuários 47 | ycom_perm_only_logged_in = Acesso para usuários loggados 48 | ycom_perm_only_not_logged_in = Acesso para todos os usuários não loggados 49 | ycom_perm_all = Acesso para todos os usuários 50 | 51 | ycom_this_login_exists_already = Este nome de usuário já existe 52 | ycom_this_email_exists_already = Este e-mail de usuário já existe 53 | ycom_please_enter_login = Por favor, insira um nome de usuário 54 | ycom_please_enter_email = Por favo, insira um endereço de e-mail -------------------------------------------------------------------------------- /lib/ycom.php: -------------------------------------------------------------------------------- 1 | */ 6 | public static array $tables = []; 7 | 8 | public static function addTable(string $table_name): void 9 | { 10 | self::$tables[] = $table_name; 11 | } 12 | 13 | /** 14 | * @return array 15 | */ 16 | public static function getTables(): array 17 | { 18 | return self::$tables; 19 | } 20 | 21 | public static function parseText(string $text): string 22 | { 23 | $text = nl2br(trim($text)); 24 | return '

' . $text . '

'; 25 | } 26 | 27 | public static function cut(string $text, int $size = 15, string $t = ' (...) '): string 28 | { 29 | $s = strlen($text); 30 | if ($s > $size) { 31 | $start = (int) ($size / 2); 32 | return substr($text, 0, $start) . $t . substr($text, -$start); 33 | } 34 | return $text; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/ycom_config.php: -------------------------------------------------------------------------------- 1 | getConfig() ?? []; 16 | self::$config = rex_extension::registerPoint(new rex_extension_point('YCOM_CONFIG', self::$config)); 17 | 18 | return self::$config; 19 | } 20 | 21 | public static function get(string $key, $default = null): mixed 22 | { 23 | self::init(); 24 | return self::$config[$key] ?? $default; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/yform/value/ycom_user.php: -------------------------------------------------------------------------------- 1 | getElement(6); 9 | 10 | $this->setValue(-1); 11 | if (null !== rex_ycom_user::getMe()) { 12 | $this->setValue(rex_ycom_user::getMe()->getValue($this->getElement(2))); 13 | $show_value = rex_ycom_user::getMe()->getValue($show_label); 14 | } 15 | 16 | $wc = ''; 17 | if (isset($this->params['warning'][$this->getId()])) { 18 | $wc = $this->params['warning'][$this->getId()]; 19 | } 20 | 21 | if ('hidden' !== trim($this->getElement(4))) { 22 | $this->params['form_output'][$this->getId()] = ' 23 |

24 | 25 | 26 |

'; 27 | } 28 | 29 | $this->params['value_pool']['email'][$this->getElement(1)] = stripslashes($this->getValue()); 30 | if ('no_db' !== $this->getElement(5)) { 31 | $this->params['value_pool']['sql'][$this->getElement(1)] = $this->getValue(); 32 | } 33 | } 34 | 35 | public function getDescription(): string 36 | { 37 | return 'ycom_user -> Beispiel: ycom_user|label|dbfield|Fieldlabel|hidden|[no_db]|showlabel'; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /lib/yform/value/ycom_user_init.php: -------------------------------------------------------------------------------- 1 | params['main_table'] = rex::getTablePrefix() . 'ycom_user'; 9 | $this->params['main_id'] = rex_ycom_auth::getUser()->getId(); 10 | } else { 11 | $this->params['warning'][$this->getId()] = $this->getElement(3); 12 | } 13 | } 14 | 15 | public function getDescription(): string 16 | { 17 | return 'ycom_user_init -> Beispiel: ycom_user_init|[label]|[name]|error_msg'; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /package.yml: -------------------------------------------------------------------------------- 1 | package: ycom 2 | version: '4.4.0' 3 | author: Yakamara Media GmbH & Co. KG 4 | supportpage: https://github.com/yakamara/redaxo_ycom/ 5 | 6 | page: 7 | title: 'translate:ycom_navi_title' 8 | perm: admin[] 9 | block: ycom 10 | icon: rex-icon fa-group 11 | subpages: 12 | docs: 13 | title: 'translate:ycom_docs' 14 | perm: admin[] 15 | pjax: false 16 | itemClass: pull-right 17 | icon: rex-icon fa-info-circle 18 | href: ?page=ycom/docs 19 | 20 | requires: 21 | php: '>=8.2' 22 | packages: 23 | yform: '^4.1.1' 24 | yrewrite: '>=2.6' 25 | redaxo: '^5.17.0' 26 | 27 | installer_ignore: 28 | - .tools 29 | - .github 30 | 31 | system_plugins: 32 | - auth 33 | - group 34 | -------------------------------------------------------------------------------- /pages/docs.php: -------------------------------------------------------------------------------- 1 | getPath('docs') . '/*.md') ?: [] as $file) { 10 | $mdFiles[mb_substr(basename($file), 0, -3)] = $file; 11 | } 12 | 13 | $currenMDFile = rex_request('mdfile', 'string', '01_intro'); 14 | if (!array_key_exists($currenMDFile, $mdFiles)) { 15 | $currenMDFile = '01_intro'; 16 | } 17 | 18 | $page = rex_be_controller::getPageObject('ycom/docs'); 19 | 20 | if (null !== $page) { 21 | foreach ($mdFiles as $key => $mdFile) { 22 | $keyWithoudPrio = mb_substr($key, 3); 23 | $page->addSubpage( 24 | (new rex_be_page($key, rex_i18n::msg('ycom_docs_' . $keyWithoudPrio))) 25 | ->setSubPath($mdFile) 26 | ->setHref('index.php?page=ycom/docs&mdfile=' . $key) 27 | ->setIsActive($key === $currenMDFile), 28 | ); 29 | } 30 | } 31 | 32 | echo rex_view::title($this->i18n('ycom_title')); 33 | 34 | [$Toc, $Content] = rex_markdown::factory()->parseWithToc(rex_file::require($mdFiles[$currenMDFile]), 2, 3, [ 35 | rex_markdown::SOFT_LINE_BREAKS => false, 36 | rex_markdown::HIGHLIGHT_PHP => true, 37 | ]); 38 | 39 | $fragment = new rex_fragment(); 40 | $fragment->setVar('content', $Content, false); 41 | $fragment->setVar('toc', $Toc, false); 42 | $content = $fragment->parse('core/page/docs.php'); 43 | 44 | $fragment = new rex_fragment(); 45 | $fragment->setVar('title', rex_i18n::msg('package_help') . ' ', false); 46 | $fragment->setVar('body', $content, false); 47 | echo $fragment->parse('core/page/section.php'); 48 | -------------------------------------------------------------------------------- /pages/index.php: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | tests/unit 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /plugins/auth/install/cas.php: -------------------------------------------------------------------------------- 1 | [ 5 | 'protocol' => 'https://', 6 | 'host' => 'xxxxxx.com', 7 | 'uri' => '/cas', 8 | 'port' => 443, 9 | 'CasServerValidation' => false, 10 | 'CasServerCACertPath' => rex_addon::get('ycom')->getDataPath('cas_cert.pem'), 11 | 'ServerVersion' => '2.0', // '2.0' => CAS_VERSION_2_0, '3.0' => CAS_VERSION_3_0, 'S1' => SAML_VERSION_1_1 12 | ], 13 | 'debug' => false, 14 | 'debugPath' => rex_path::log('ycom_auth_cas.log'), 15 | ]; 16 | -------------------------------------------------------------------------------- /plugins/auth/install/oauth2.php: -------------------------------------------------------------------------------- 1 | 'demoapp', // The client ID assigned to you by the provider 5 | 'clientSecret' => 'demopass', // The client password assigned to you by the provider 6 | 'redirectUri' => '', // do not fill out first and wait for the login error message to fill it out 7 | 'urlAuthorize' => '', 8 | 'urlAccessToken' => '', 9 | 'urlResourceOwnerDetails' => '', 10 | ]; 11 | -------------------------------------------------------------------------------- /plugins/auth/lang/pt_br.lang: -------------------------------------------------------------------------------- 1 | ycom_auth_title = Autentificação 2 | 3 | ycom_auth_settings = Configurações 4 | ycom_auth_description = Explicação 5 | 6 | ycom_auth_config = Configuração 7 | ycom_auth_config_save = Salvar configuração 8 | ycom_auth_config_status = Status 9 | ycom_auth_config_security = Segurança 10 | ycom_auth_config_forwarder = Seguir para o produto 11 | ycom_auth_config_login_field = Campo para login 12 | 13 | ycom_auth_config_status_authactive = Autentificação ativa 14 | ycom_auth_config_status_stayactive = "Permanecer conectado" ativo 15 | ycom_auth_config_security_hashedpasswd = Senhas criptografadas (sha1) 16 | ycom_auth_config_id_jump_ok = ... ao conectar-se com sucesso 17 | ycom_auth_config_id_jump_not_ok = ... ao não se conectar com sucesso 18 | ycom_auth_config_id_jump_logout = ... ao se desconectar 19 | ycom_auth_config_id_jump_denied = ... ao tentar acessar um produto restrito 20 | ycom_auth_config_id_jump_activation_ok = ... ao ativar com sucesso 21 | ycom_auth_config_id_jump_activation_fail = ... quando a ativação não foi bem sucedida 22 | ycom_auth_config_id_jump_newpassword_ok = ... ao resetar a senha com sucesso 23 | ycom_auth_config_id_jump_newpassword_fail = ... ao resetar a senha sem sucesso 24 | 25 | ycom_auth_settings_updated = A configuração foi salva 26 | 27 | ycom_auth_info_title = Explicação 28 | 29 | ycom_auth_perm = Permissões 30 | ycom_auth_update_perm = Atualizar 31 | ycom_auth_perm_updated = Permissões foram atualizadas 32 | 33 | ycom_auth_password_not_updated = Senha não foi atualizada 34 | ycom_auth_password_updated = Senha foi atualizada 35 | ycom_auth_password_exists = A senha já é utilizada 36 | ycom_auth_password_isempty = A senha ainda não é utilizada -------------------------------------------------------------------------------- /plugins/auth/lib/injections/abstract.php: -------------------------------------------------------------------------------- 1 | getValue('new_password_required')) { 11 | if ($article_id_password != rex_article::getCurrentId()) { 12 | return rex_getUrl($article_id_password, '', [], '&'); 13 | } 14 | } 15 | } 16 | return false; 17 | } 18 | 19 | public function getSettingsContent(): string 20 | { 21 | $addon = rex_plugin::get('ycom', 'auth'); 22 | return ' 23 |
24 | ' . $addon->i18n('ycom_auth_config_passwordchange') . ' 25 |
26 |
27 | 28 |
29 |
30 | ' . rex_var_link::getWidget(9, 'article_id_jump_password', (int) $addon->getConfig('article_id_jump_password')) . ' 31 | [article_id_jump_password] 32 |
33 |
34 |
35 | '; 36 | } 37 | 38 | public function triggerSaveSettings(): void 39 | { 40 | $addon = rex_plugin::get('ycom', 'auth'); 41 | $addon->setConfig('article_id_jump_password', rex_request('article_id_jump_password', 'int')); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /plugins/auth/lib/injections/termsofuse.php: -------------------------------------------------------------------------------- 1 | getValue('termsofuse_accepted')) { 11 | if ($article_id_termsofuse != rex_article::getCurrentId()) { 12 | return rex_getUrl($article_id_termsofuse, '', [], '&'); 13 | } 14 | } 15 | } 16 | return false; 17 | } 18 | 19 | public function getSettingsContent(): string 20 | { 21 | $addon = rex_plugin::get('ycom', 'auth'); 22 | 23 | return ' 24 |
25 | ' . $addon->i18n('ycom_auth_config_termsofuse') . ' 26 |
27 |
28 | 29 |
30 |
31 | ' . rex_var_link::getWidget(10, 'article_id_jump_termsofuse', (int) $addon->getConfig('article_id_jump_termsofuse')) . ' 32 | [article_id_jump_termsofuse] 33 |
34 |
35 |
36 | '; 37 | } 38 | 39 | public function triggerSaveSettings(): void 40 | { 41 | $addon = rex_plugin::get('ycom', 'auth'); 42 | $addon->setConfig('article_id_jump_termsofuse', rex_request('article_id_jump_termsofuse', 'int', 0)); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /plugins/auth/lib/otp/exception.php: -------------------------------------------------------------------------------- 1 | verify($otp); 19 | } 20 | 21 | public static function getPeriod(): int 22 | { 23 | // default period is 30s and digest is sha1. Google Authenticator is restricted to this settings 24 | return 30; 25 | } 26 | 27 | public static function getloginTries(): int 28 | { 29 | return 10; 30 | } 31 | 32 | public function getProvisioningUri(rex_ycom_user $user): string 33 | { 34 | // create a uri with a random secret 35 | $otp = TOTP::create(null, self::getPeriod()); 36 | 37 | // the label rendered in "Google Authenticator" or similar app 38 | $label = $user->getValue('login') . '@' . rex::getServerName() . ' (' . $_SERVER['HTTP_HOST'] . ')'; 39 | $label = str_replace(':', '_', $label); // colon is forbidden 40 | $otp->setLabel($label); 41 | $otp->setIssuer(str_replace(':', '_', $user->getValue('login'))); 42 | 43 | return $otp->getProvisioningUri(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /plugins/auth/lib/yform/action/ycom_auth_db.php: -------------------------------------------------------------------------------- 1 | getElement(2); 18 | 19 | switch ($action) { 20 | case 'delete': 21 | rex_ycom_log::log($user, rex_ycom_log::TYPE_LOGIN_DELETED, [ 22 | 'self delete', 23 | ]); 24 | rex_ycom_auth::deleteUser($user->getValue('id')); 25 | rex_ycom_auth::clearUserSession(); 26 | 27 | break; 28 | case 'update': 29 | default: 30 | rex_ycom_log::log($user, rex_ycom_log::TYPE_LOGIN_UPDATED, [ 31 | 'self update', 32 | ]); 33 | 34 | $this->params['main_table'] = rex_ycom_user::table()->getTableName(); 35 | $this->params['main_where'] = 'id=' . (int) (rex_ycom_user::getMe() ? rex_ycom_user::getMe()->getId() : 0); 36 | 37 | $this->setElement(2, ''); 38 | $this->setElement(3, 'main_where'); 39 | 40 | parent::executeAction(); 41 | } 42 | } 43 | 44 | public function getDescription(): string 45 | { 46 | return 'action|ycom_auth_db|update(default)/delete'; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /plugins/auth/lib/yform/validate/ycom_auth_login.php: -------------------------------------------------------------------------------- 1 | params['warning'][] = 1; 9 | $this->params['warning_messages'][] = rex_i18n::translate($this->getElement(4)); 10 | return; 11 | } 12 | 13 | $vars = []; 14 | 15 | $e = explode(',', $this->getElement(2)); 16 | foreach ($e as $v) { 17 | $w = explode('=', $v); 18 | $label = $w[0]; 19 | $value = trim(rex_request($w[1], 'string')); 20 | $vars[$label] = $value; 21 | } 22 | 23 | $filter = null; 24 | if ('' != $this->getElement(3)) { 25 | $filter_query = $this->getElement(3); 26 | $filter = static function (rex_yform_manager_query $query) use ($filter_query) { 27 | $query->whereRaw($filter_query); 28 | }; 29 | } 30 | 31 | rex_ycom_auth::loginWithParams($vars, $filter); 32 | 33 | if (null === rex_ycom_auth::getUser()) { 34 | $this->params['warning'][] = 1; 35 | $this->params['warning_messages'][] = rex_i18n::translate($this->getElement(4)); 36 | } else { 37 | // Load fields for eMail or DB 38 | $fields = $this->getElement(5); 39 | if ('' != $fields) { 40 | $fields = explode(',', $fields); 41 | foreach ($fields as $field) { 42 | $this->params['value_pool']['email'][$field] = rex_ycom_auth::getUser()->getValue($field); 43 | if ('no_db' != $this->getElement(6)) { 44 | $this->params['value_pool']['sql'][$field] = rex_ycom_auth::getUser()->getValue($field); 45 | } 46 | } 47 | } 48 | } 49 | } 50 | 51 | public function getDescription(): string 52 | { 53 | return 'ycom_auth_login -> prüft ob leer, beispiel: validate|ycom_auth_login|label1=request1,label2=request2|status>0|warning_message|opt:load_field1,load_field2,load_field3|[no_db] '; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /plugins/auth/lib/yform/validate/ycom_auth_password.php: -------------------------------------------------------------------------------- 1 | getValueObject(); 8 | 9 | $user = rex_ycom_auth::getUser(); 10 | if (null === $user) { 11 | // no user available -> error 12 | $this->params['warning'][$Object->getId()] = $this->params['error_class']; 13 | $this->params['warning_messages'][$Object->getId()] = $this->getElement(3); 14 | return; 15 | } 16 | 17 | $status = rex_ycom_auth::checkPassword($Object->getValue(), $user->getId()); 18 | if (!$status) { 19 | // password wrong 20 | $this->params['warning'][$Object->getId()] = $this->params['error_class']; 21 | $this->params['warning_messages'][$Object->getId()] = $this->getElement(3); 22 | } 23 | } 24 | 25 | public function getDescription(): string 26 | { 27 | return 'ycom_auth_password -> validate|ycom_auth_password|pswfield|warning_message'; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /plugins/auth/lib/yform/value/ycom_auth_load_user.php: -------------------------------------------------------------------------------- 1 | params['send']) { 8 | $fields = $this->getElement(2); 9 | if ('' != $fields) { 10 | $fields = explode(',', $this->getElement(2)); 11 | } else { 12 | $fields = []; 13 | } 14 | foreach ($this->params['values'] as $o) { 15 | if ((0 == count($fields) || in_array($o->getName(), $fields)) && $o->getName() != $this->getName()) { 16 | $o->setValue(@rex_ycom_auth::getUser()->getValue($o->getName())); 17 | } 18 | } 19 | } 20 | } 21 | 22 | public function getDescription(): string 23 | { 24 | return 'ycom_auth_load_user -> Beispiel: ycom_auth_load_user|label|opt:field1,field2,field3'; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /plugins/auth/lib/yform/value/ycom_auth_logout.php: -------------------------------------------------------------------------------- 1 | getElement(3); 19 | $returnTos[] = rex_getUrl(rex_ycom_config::get('article_id_jump_logout')); 20 | 21 | $allowedDomains = ('' != $this->getElement(2)) ? explode(',', $this->getElement(2)) : []; 22 | $returnTo = rex_ycom_auth::getReturnTo($returnTos, $allowedDomains); 23 | 24 | rex_ycom_auth::logout($me); 25 | 26 | if ('' != $returnTo) { 27 | rex_response::sendCacheControl(); 28 | rex_response::sendRedirect($returnTo); 29 | } 30 | } 31 | } 32 | 33 | public function getDescription(): string 34 | { 35 | return 'ycom_auth_logout -> Beispiel: ycom_auth_logout|label|[allowed domains: DomainA,DomainB]|[returnTo]'; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /plugins/auth/lib/yform/value/ycom_auth_returnto.php: -------------------------------------------------------------------------------- 1 | www.yakamara.de 8 | */ 9 | 10 | class rex_yform_value_ycom_auth_returnto extends rex_yform_value_abstract 11 | { 12 | public function enterObject(): void 13 | { 14 | $returnTo = $this->getValue(); 15 | 16 | $returnTos = []; 17 | $returnTos[] = (string) $returnTo; 18 | $returnTos[] = rex_request('returnTo', 'string'); 19 | $returnTos[] = $this->getElement(3); 20 | $returnTos[] = rex_getUrl(rex_ycom_config::get('article_id_jump_ok'), '', [], '&'); 21 | $allowedDomains = ('' != $this->getElement(2)) ? explode(',', $this->getElement(2)) : []; 22 | $returnTo = rex_ycom_auth::getReturnTo($returnTos, $allowedDomains); 23 | 24 | $this->setValue($returnTo); 25 | 26 | if ($this->needsOutput()) { 27 | $this->params['form_output'][$this->getId()] = $this->parse('value.hidden.tpl.php'); 28 | } 29 | 30 | $this->params['value_pool']['email'][$this->getName()] = $this->getValue(); 31 | } 32 | 33 | public function executeAction(): void 34 | { 35 | if ('' != $this->getValue()) { 36 | header('Location: ' . $this->getValue()); 37 | $this->params['form_exit'] = true; 38 | } 39 | } 40 | 41 | public function getDescription(): string 42 | { 43 | return 'ycom_auth_returnto|label|[allowed domains: DomainA,DomainB]|[URL]'; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /plugins/auth/package.yml: -------------------------------------------------------------------------------- 1 | package: ycom/auth 2 | version: '4.3.0' 3 | author: Yakamara Media GmbH & Co. KG 4 | title: 'Auth' 5 | nav_icon: fa-minus 6 | description: 'translate:ycom_auth_plugin' 7 | 8 | page: 9 | title: 'translate:ycom_auth_title' 10 | hidden: false 11 | subpages: 12 | settings: 13 | title: 'translate:ycom_auth_settings' 14 | sessions: 15 | title: 'translate:ycom_current_sessions' 16 | tokens: 17 | title: 'translate:ycom_current_tokens' 18 | log: 19 | title: 'translate:ycom_log' 20 | 21 | pages: 22 | system/log/ycom_user: 23 | title: translate:ycom_user_log 24 | perm: admin 25 | 26 | default_config: 27 | auth_cookie_ttl: '14' 28 | auth_rule: 'login_try_5_pause' 29 | login_field: 'email' 30 | -------------------------------------------------------------------------------- /plugins/auth/pages/index.php: -------------------------------------------------------------------------------- 1 | i18n('title')); // $this->i18n('title') ist eine Kurzform für rex_i18n::msg('dummy_title') 9 | 10 | // Die Subpages werden nicht mehr über den "subpage"-Parameter gesteuert, sondern mit über "page" (getrennt mit einem Slash, z. B. page=dummy/config) 11 | // Die einzelnen Teile des page-Pfades können mit der folgenden Funktion ausgelesen werden. 12 | // $subpage = rex_be_controller::getCurrentPagePart(2); 13 | 14 | // Subpages können über diese Methode eingebunden werden. So ist sichergestellt, dass auch Subpages funktionieren, 15 | // die von anderen Addons/Plugins hinzugefügt wurden 16 | rex_be_controller::includeCurrentPageSubPath(); 17 | -------------------------------------------------------------------------------- /plugins/auth/pages/log.php: -------------------------------------------------------------------------------- 1 | i18n('ycom_title')); 9 | 10 | // this file integrates the already existing log-viewer as a syslog page. 11 | // the required registration wiring can be found in the package.yml 12 | require __DIR__ . '/system.log.ycom_user.php'; 13 | -------------------------------------------------------------------------------- /plugins/auth/update.php: -------------------------------------------------------------------------------- 1 | includeFile(__DIR__ . '/install.php'); 9 | -------------------------------------------------------------------------------- /plugins/auth/ytemplates/bootstrap/value.ycom_auth_extern.tpl.php: -------------------------------------------------------------------------------- 1 | ' . $name . ''; 12 | -------------------------------------------------------------------------------- /plugins/auth/ytemplates/bootstrap/value.ycom_auth_saml.tpl.php: -------------------------------------------------------------------------------- 1 | ' . $name . ''; 12 | -------------------------------------------------------------------------------- /plugins/group/boot.php: -------------------------------------------------------------------------------- 1 | getSubject(); 15 | $yform->setValueField('choice', [ 16 | 'name' => 'ycom_group_type', 17 | 'label' => rex_i18n::msg('ycom_group_type'), 18 | 'choices' => rex_ycom_group::$perms, 19 | ]); 20 | $yform->setValueField('choice', [ 21 | 'name' => 'ycom_groups', 22 | 'label' => rex_i18n::msg('ycom_groups'), 23 | 'choices' => rex_ycom_group::getGroups(), 24 | 'size' => 5, 25 | 'multiple' => true, 26 | ]); 27 | return $yform; 28 | }); 29 | } 30 | 31 | rex_extension::register('YCOM_AUTH_USER_CHECK', static function (rex_extension_point $ep) { 32 | if (!$ep->getSubject()) { 33 | return false; 34 | } 35 | 36 | /** @var rex_article|rex_category $article */ 37 | $article = $ep->getParam('article'); 38 | 39 | if (1 != $article->getValue('ycom_auth_type')) { 40 | return $ep->getSubject(); 41 | } 42 | 43 | /** @var rex_ycom_user|null $me */ 44 | $me = $ep->getParam('me'); 45 | $type = (string) $article->getValue('ycom_group_type'); 46 | $userGroups = ($me) ? $me->getGroups() : []; 47 | $articleGroups = (string) $article->getValue('ycom_groups'); 48 | 49 | $groups = []; 50 | if ('' != $articleGroups) { 51 | $groups = explode(',', $articleGroups); 52 | } 53 | 54 | return rex_ycom_group::hasGroupPerm($type, $groups, $userGroups); 55 | }); 56 | -------------------------------------------------------------------------------- /plugins/group/install.php: -------------------------------------------------------------------------------- 1 | ensureColumn(new rex_sql_column('ycom_group_type', 'int', false, '0')) 10 | ->ensureColumn(new rex_sql_column('ycom_groups', 'text')) 11 | ->alter() 12 | ; 13 | -------------------------------------------------------------------------------- /plugins/group/lang/de_de.lang: -------------------------------------------------------------------------------- 1 | 2 | ycom_group_title = Gruppen 3 | ycom_group_name = Gruppen 4 | ycom_group_yform_enter_name = Bitte geben Sie den Gruppennamen ein. 5 | rex_ycom_group = Community Group 6 | 7 | ycom_group_forallgroups = Für alle, egal welche Gruppe 8 | ycom_group_inallgroups = Muss in jeder Gruppe sein 9 | ycom_group_inonegroup = Muss in einer Gruppe sein 10 | ycom_group_nogroups = Hat keine Gruppen 11 | 12 | ycom_group_type = Gruppenrechte 13 | ycom_groups = Gruppen 14 | -------------------------------------------------------------------------------- /plugins/group/lang/en_gb.lang: -------------------------------------------------------------------------------- 1 | 2 | ycom_group_title = Groups 3 | ycom_group_name = Groups 4 | ycom_group_yform_enter_name = Please enter the group name 5 | rex_ycom_group = Community Group 6 | 7 | ycom_group_forallgroups = For all, independent of group 8 | ycom_group_inallgroups = Has to be in every group 9 | ycom_group_inonegroup = Has to be in one group 10 | ycom_group_nogroups = Has no groups 11 | 12 | ycom_group_type = Group permissions 13 | ycom_groups = Groups 14 | -------------------------------------------------------------------------------- /plugins/group/lang/es_es.lang: -------------------------------------------------------------------------------- 1 | 2 | ycom_group_title = Grupo 3 | ycom_group_name = Grupo 4 | ycom_group_yform_enter_name = Por favor ingrese el nombre del grupo. 5 | rex_ycom_group = Grupo Comunitario 6 | 7 | ycom_group_forallgroups = Para todos, no importa qué grupo 8 | ycom_group_inallgroups = Debe estar en cada grupo 9 | ycom_group_inonegroup = Debe estar en un grupo 10 | ycom_group_nogroups = No tiene grupos 11 | 12 | ycom_group_type = Los derechos de grupo 13 | ycom_groups = Grupo 14 | -------------------------------------------------------------------------------- /plugins/group/lang/pt_br.lang: -------------------------------------------------------------------------------- 1 | 2 | ycom_group_title = Grupos 3 | ycom_group_name = Grupos 4 | ycom_group_yform_enter_name = Por favor, insira o nome do grupo 5 | rex_ycom_group = Grupo comunitário 6 | 7 | ycom_group_forallgroups = Para todos, independente do grupo 8 | ycom_group_inallgroups = Tem que estar em todos os grupos 9 | ycom_group_inonegroup = Tem que estar em um grupo 10 | ycom_group_nogroups = Não tem grupos 11 | 12 | ycom_group_type = Permissões de grupo 13 | ycom_groups = Grupos 14 | -------------------------------------------------------------------------------- /plugins/group/lang/sv_se.lang: -------------------------------------------------------------------------------- 1 | 2 | ycom_group_title = Grupper 3 | ycom_group_name = Grupper 4 | ycom_group_yform_enter_name = Var god ange ett gruppnamn 5 | rex_ycom_group = Community Group 6 | 7 | ycom_group_forallgroups = Till alla, oavsett grupp 8 | ycom_group_inallgroups = Måste vara med i alla grupper 9 | ycom_group_inonegroup = Måste vara i en grupp 10 | ycom_group_nogroups = Har inga grupper 11 | 12 | ycom_group_type = Gruppbehörigheter 13 | ycom_groups = Grupper 14 | -------------------------------------------------------------------------------- /plugins/group/package.yml: -------------------------------------------------------------------------------- 1 | package: ycom/group 2 | version: '4.3.0' 3 | author: Yakamara Media GmbH & Co. KG 4 | title: 'Group' 5 | nav_icon: fa-minus 6 | description: 'translate:ycom_group_plugin' 7 | 8 | -------------------------------------------------------------------------------- /plugins/group/uninstall.php: -------------------------------------------------------------------------------- 1 | setQuery('DELETE FROM `' . rex::getTable('yform_table') . '` WHERE table_name = "' . rex::getTable('ycom_group') . '"'); 10 | $sql->setQuery('DELETE FROM `' . rex::getTable('yform_field') . '` WHERE table_name = "' . rex::getTable('ycom_group') . '"'); 11 | $sql->setQuery('DELETE FROM `' . rex::getTable('yform_field') . '` WHERE table_name = "' . rex::getTable('ycom_user') . '" and name="ycom_groups"'); 12 | $sql->setQuery('DELETE FROM `' . rex::getTable('yform_history') . '` WHERE table_name = "' . rex::getTable('ycom_group') . '"'); 13 | 14 | rex_sql_table::get(rex::getTable('ycom_group')) 15 | ->drop(); 16 | 17 | rex_yform_manager_table::deleteCache(); 18 | -------------------------------------------------------------------------------- /plugins/group/update.php: -------------------------------------------------------------------------------- 1 | includeFile(__DIR__ . '/install.php'); 9 | -------------------------------------------------------------------------------- /plugins/media_auth/install.php: -------------------------------------------------------------------------------- 1 | ensureColumn(new rex_sql_column('ycom_auth_type', 'int(11)', false, '0')) 10 | ->ensureColumn(new rex_sql_column('ycom_group_type', 'int(11)', false, '0')) 11 | ->ensureColumn(new rex_sql_column('ycom_groups', 'text')) 12 | ->alter(); 13 | -------------------------------------------------------------------------------- /plugins/media_auth/lang/de_de.lang: -------------------------------------------------------------------------------- 1 | ycom_media_auth_title = Medien 2 | ycom_media_auth_settings = Einstellungen 3 | ycom_auth_config_media_auth_rules = Regel wenn Medium nicht aufgerufen werden darf 4 | 5 | ycom_media_auth_failed_header_notfound = Header `Not Found` senden 6 | ycom_media_auth_failed_header_perm_denied = Header `Permission denied` senden 7 | ycom_media_auth_failed_redirect_login = Weiterleitung zu Login mit Redirect auf Medium (wenn nicht eingeloggt). Bei Fehler 401 Header (wenn eingeloggt) 8 | ycom_media_auth_failed_redirect_login_with_error_page = Weiterleitung zu Login mit Redirect auf Medium (wenn nicht eingeloggt). Bei Fehler Weiterleitung auf Error-Seite (wenn eingeloggt) 9 | ycom_media_auth_failed_header_redirect_notfound = Weiterleitung zu NotFound Article 10 | 11 | ycom_media_auth_settings_updated = Einstellungen wurden aktualisiert 12 | -------------------------------------------------------------------------------- /plugins/media_auth/lang/en_gb.lang: -------------------------------------------------------------------------------- 1 | ycom_media_auth_title = Media 2 | ycom_media_auth_settings = Settings 3 | ycom_auth_config_media_auth_rules = Rule for denying media 4 | 5 | ycom_media_auth_failed_header_notfound = send header `Not Found` 6 | ycom_media_auth_failed_header_perm_denied = send header `Permission denied` 7 | ycom_media_auth_failed_redirect_login = Redirect to login with redirect to media (if not logged in). In case of error with 401 response header (if logged in) 8 | ycom_media_auth_failed_redirect_login_with_error_page = Redirect to login with redirect to media (if not logged in). In case of erro 9 | ycom_media_auth_failed_header_redirect_notfound = Redirect to NotFound article 10 | 11 | ycom_media_auth_settings_updated = Settings updated 12 | -------------------------------------------------------------------------------- /plugins/media_auth/lang/es_es.lang: -------------------------------------------------------------------------------- 1 | ycom_media_auth_title = Media 2 | ycom_media_auth_settings = Ajustes 3 | ycom_auth_config_media_auth_rules = Regla si no se puede llamar medio 4 | 5 | ycom_media_auth_failed_header_notfound = Encabezado `Not Found` senden 6 | ycom_media_auth_failed_header_perm_denied = Encabezado `Permiso denegado` senden 7 | ycom_media_auth_failed_redirect_login = Redirigir al inicio de sesión con Redirigir a medio (si no se ha iniciado sesión) 8 | ycom_media_auth_failed_redirect_login_with_error_page = Reenvío para iniciar sesión con redireccionamiento en media (si no está conectado). Si los errores se reenvían a la página de error (si está conectado) 9 | ycom_media_auth_failed_header_redirect_notfound = Reenvío a artículo NotFound 10 | 11 | ycom_media_auth_settings_updated = Configuraciones se han actualizado 12 | -------------------------------------------------------------------------------- /plugins/media_auth/lang/sv_se.lang: -------------------------------------------------------------------------------- 1 | ycom_media_auth_title = Media 2 | ycom_media_auth_settings = Inställningar 3 | ycom_auth_config_media_auth_rules = Regel om mediet inte kan öppnas 4 | 5 | ycom_media_auth_failed_header_notfound = Skicka Header `Not Found` 6 | ycom_media_auth_failed_header_perm_denied = Skicka Header `Permission denied` 7 | ycom_media_auth_failed_redirect_login = Ompekning till inloggning med redirect till medium (om inte inloggad) 8 | ycom_media_auth_failed_redirect_login_with_error_page = Omdirigera till inloggning med Redirect till medium (om inte inloggad). Vid fel vidarebefordran till felsida (om du är inloggad) 9 | ycom_media_auth_failed_header_redirect_notfound = Vidarebefordring till NotFound Article 10 | 11 | ycom_media_auth_settings_updated = Inställningarna aktualiserades 12 | -------------------------------------------------------------------------------- /plugins/media_auth/package.yml: -------------------------------------------------------------------------------- 1 | package: ycom/media_auth 2 | version: '4.3.0' 3 | author: Yakamara Media GmbH & Co. KG 4 | title: 'MediaAuth' 5 | nav_icon: fa-minus 6 | description: 'translate:ycom_media_auth' 7 | 8 | page: 9 | title: 'translate:ycom_media_auth_title' 10 | hidden: false 11 | subpages: 12 | settings: { title: 'translate:ycom_media_auth_settings'} 13 | -------------------------------------------------------------------------------- /plugins/media_auth/pages/index.php: -------------------------------------------------------------------------------- 1 | i18n('title')); // $this->i18n('title') ist eine Kurzform für rex_i18n::msg('dummy_title') 9 | 10 | // Die Subpages werden nicht mehr über den "subpage"-Parameter gesteuert, sondern mit über "page" (getrennt mit einem Slash, z. B. page=dummy/config) 11 | // Die einzelnen Teile des page-Pfades können mit der folgenden Funktion ausgelesen werden. 12 | // $subpage = rex_be_controller::getCurrentPagePart(2); 13 | 14 | // Subpages können über diese Methode eingebunden werden. So ist sichergestellt, dass auch Subpages funktionieren, 15 | // die von anderen Addons/Plugins hinzugefügt wurden 16 | 17 | $currentPage = rex_be_controller::getCurrentPageObject(); 18 | if (null !== $currentPage) { 19 | include $currentPage->getSubPath(); 20 | } 21 | -------------------------------------------------------------------------------- /plugins/media_auth/uninstall.php: -------------------------------------------------------------------------------- 1 | removeColumn('ycom_auth_type') 10 | ->removeColumn('ycom_group_type') 11 | ->removeColumn('ycom_groups') 12 | ->alter(); 13 | -------------------------------------------------------------------------------- /plugins/media_auth/update.php: -------------------------------------------------------------------------------- 1 | includeFile(__DIR__ . '/install.php'); 9 | -------------------------------------------------------------------------------- /tests/unit/login_test.php: -------------------------------------------------------------------------------- 1 | 'admin', 14 | 'loginPassword' => 'admin', 15 | 'filter' => [], 16 | 'loginStay' => false, 17 | 'ignorePassword' => false, 18 | ]; 19 | 20 | $status = rex_ycom_auth::login($params); 21 | self::assertEquals(rex_ycom_auth::STATUS_LOGIN_FAILED, $status); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /uninstall.php: -------------------------------------------------------------------------------- 1 | setQuery('DELETE FROM `' . rex::getTable('yform_table') . '` WHERE table_name = "' . rex::getTable('ycom_user') . '"'); 10 | $sql->setQuery('DELETE FROM `' . rex::getTable('yform_field') . '` WHERE table_name = "' . rex::getTable('ycom_user') . '"'); 11 | $sql->setQuery('DELETE FROM `' . rex::getTable('yform_history') . '` WHERE table_name = "' . rex::getTable('ycom_user') . '"'); 12 | 13 | rex_sql_table::get(rex::getTable('article')) 14 | ->removeColumn('ycom_auth_type') 15 | ->removeColumn('ycom_group_type') 16 | ->removeColumn('ycom_groups') 17 | ->alter(); 18 | 19 | rex_sql_table::get(rex::getTable('ycom_user_session')) 20 | ->drop(); 21 | 22 | rex_sql_table::get(rex::getTable('ycom_user')) 23 | ->drop(); 24 | 25 | foreach ($this->getInstalledPlugins() as $plugin) { 26 | // use path relative to __DIR__ to get correct path in update temp dir 27 | $file = __DIR__ . '/plugins/' . $plugin->getName() . '/uninstall.php'; 28 | 29 | if (file_exists($file)) { 30 | $plugin->includeFile($file); 31 | } 32 | } 33 | 34 | rex_yform_manager_table::deleteCache(); 35 | -------------------------------------------------------------------------------- /update.php: -------------------------------------------------------------------------------- 1 | includeFile(__DIR__ . '/install.php'); 9 | -------------------------------------------------------------------------------- /vendor/apereo/phpcas/CAS.php: -------------------------------------------------------------------------------- 1 | 26 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 27 | * @link https://wiki.jasig.org/display/CASC/phpCAS 28 | */ 29 | 30 | require_once __DIR__.'/source/CAS.php'; 31 | 32 | trigger_error('Including CAS.php is deprecated. Install phpCAS using composer instead.', E_USER_DEPRECATED); 33 | -------------------------------------------------------------------------------- /vendor/apereo/phpcas/README.md: -------------------------------------------------------------------------------- 1 | phpCAS 2 | ======= 3 | 4 | phpCAS is an authentication library that allows PHP applications to easily authenticate 5 | users via a Central Authentication Service (CAS) server. 6 | 7 | Please see the wiki website for more information: 8 | 9 | https://apereo.github.io/phpCAS/ 10 | 11 | Api documentation can be found here: 12 | 13 | https://apereo.github.io/phpCAS/api/ 14 | 15 | 16 | [![Test](https://github.com/apereo/phpCAS/actions/workflows/test.yml/badge.svg)](https://github.com/apereo/phpCAS/actions/workflows/test.yml) 17 | 18 | LICENSE 19 | ------- 20 | 21 | Copyright 2007-2020, Apereo Foundation. 22 | This project includes software developed by Apereo Foundation. 23 | http://www.apereo.org/ 24 | 25 | Licensed under the Apache License, Version 2.0 (the "License"); 26 | you may not use this software except in compliance with the License. 27 | You may obtain a copy of the License at: 28 | 29 | http://www.apache.org/licenses/LICENSE-2.0 30 | 31 | Unless required by applicable law or agreed to in writing, software 32 | distributed under the License is distributed on an "AS IS" BASIS, 33 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 34 | See the License for the specific language governing permissions and 35 | limitations under the License. 36 | -------------------------------------------------------------------------------- /vendor/apereo/phpcas/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "apereo/phpcas", 3 | "description" : "Provides a simple API for authenticating users against a CAS server", 4 | "keywords" : [ 5 | "cas", 6 | "jasig", 7 | "apereo" 8 | ], 9 | "homepage" : "https://wiki.jasig.org/display/CASC/phpCAS", 10 | "type" : "library", 11 | "license" : "Apache-2.0", 12 | "authors" : [{ 13 | "name" : "Joachim Fritschi", 14 | "homepage" : "https://github.com/jfritschi", 15 | "email" : "jfritschi@freenet.de" 16 | }, { 17 | "name" : "Adam Franco", 18 | "homepage" : "https://github.com/adamfranco" 19 | }, { 20 | "name" : "Henry Pan", 21 | "homepage" : "https://github.com/phy25" 22 | } 23 | ], 24 | "require" : { 25 | "php" : ">=7.1.0", 26 | "ext-curl" : "*", 27 | "ext-dom" : "*", 28 | "psr/log" : "^1.0 || ^2.0 || ^3.0" 29 | }, 30 | "require-dev" : { 31 | "monolog/monolog" : "^1.0.0 || ^2.0.0", 32 | "phpunit/phpunit" : ">=7.5", 33 | "phpstan/phpstan" : "^1.5" 34 | }, 35 | "autoload" : { 36 | "files": ["source/CAS.php"], 37 | "classmap" : [ 38 | "source/" 39 | ] 40 | }, 41 | "autoload-dev" : { 42 | "psr-4" : { 43 | "PhpCas\\" : "test/CAS/" 44 | } 45 | }, 46 | "scripts" : { 47 | "test" : "phpunit", 48 | "phpstan" : "phpstan" 49 | }, 50 | "extra" : { 51 | "branch-alias" : { 52 | "dev-master" : "1.3.x-dev" 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /vendor/apereo/phpcas/source/CAS/InvalidArgumentException.php: -------------------------------------------------------------------------------- 1 | 26 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 27 | * @link https://wiki.jasig.org/display/CASC/phpCAS 28 | */ 29 | 30 | /** 31 | * Exception that denotes invalid arguments were passed. 32 | * 33 | * @class CAS_InvalidArgumentException 34 | * @category Authentication 35 | * @package PhpCAS 36 | * @author Adam Franco 37 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 38 | * @link https://wiki.jasig.org/display/CASC/phpCAS 39 | */ 40 | class CAS_InvalidArgumentException 41 | extends InvalidArgumentException 42 | implements CAS_Exception 43 | { 44 | 45 | } 46 | ?> 47 | -------------------------------------------------------------------------------- /vendor/apereo/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php: -------------------------------------------------------------------------------- 1 | 27 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 28 | * @link https://wiki.jasig.org/display/CASC/phpCAS 29 | */ 30 | 31 | /** 32 | * This class defines Exceptions that should be thrown when the sequence of 33 | * operations is invalid. In this case it should be thrown when an 34 | * authentication call has not yet happened. 35 | * 36 | * @class CAS_OutOfSequenceBeforeAuthenticationCallException 37 | * @category Authentication 38 | * @package PhpCAS 39 | * @author Joachim Fritschi 40 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 41 | * @link https://wiki.jasig.org/display/CASC/phpCAS 42 | */ 43 | class CAS_OutOfSequenceBeforeAuthenticationCallException 44 | extends CAS_OutOfSequenceException 45 | implements CAS_Exception 46 | { 47 | /** 48 | * Return standard error meessage 49 | * 50 | * @return void 51 | */ 52 | public function __construct () 53 | { 54 | parent::__construct('An authentication call hasn\'t happened yet.'); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /vendor/apereo/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php: -------------------------------------------------------------------------------- 1 | 27 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 28 | * @link https://wiki.jasig.org/display/CASC/phpCAS 29 | */ 30 | 31 | /** 32 | * This class defines Exceptions that should be thrown when the sequence of 33 | * operations is invalid. In this case it should be thrown when the proxy() call 34 | * has not yet happened and no proxy object exists. 35 | * 36 | * @class CAS_OutOfSequenceBeforeProxyException 37 | * @category Authentication 38 | * @package PhpCAS 39 | * @author Joachim Fritschi 40 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 41 | * @link https://wiki.jasig.org/display/CASC/phpCAS 42 | */ 43 | class CAS_OutOfSequenceBeforeProxyException 44 | extends CAS_OutOfSequenceException 45 | implements CAS_Exception 46 | { 47 | 48 | /** 49 | * Return standard error message 50 | * 51 | * @return void 52 | */ 53 | public function __construct () 54 | { 55 | parent::__construct( 56 | 'this method cannot be called before phpCAS::proxy()' 57 | ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /vendor/apereo/phpcas/source/CAS/OutOfSequenceException.php: -------------------------------------------------------------------------------- 1 | 27 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 28 | * @link https://wiki.jasig.org/display/CASC/phpCAS 29 | */ 30 | 31 | /** 32 | * This class defines Exceptions that should be thrown when the sequence of 33 | * operations is invalid. Examples are: 34 | * - Requesting the response before executing a request. 35 | * - Changing the URL of a request after executing the request. 36 | * 37 | * @class CAS_OutOfSequenceException 38 | * @category Authentication 39 | * @package PhpCAS 40 | * @author Adam Franco 41 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 42 | * @link https://wiki.jasig.org/display/CASC/phpCAS 43 | */ 44 | class CAS_OutOfSequenceException 45 | extends BadMethodCallException 46 | implements CAS_Exception 47 | { 48 | 49 | } 50 | -------------------------------------------------------------------------------- /vendor/apereo/phpcas/source/CAS/ProxiedService/Exception.php: -------------------------------------------------------------------------------- 1 | 26 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 27 | * @link https://wiki.jasig.org/display/CASC/phpCAS 28 | */ 29 | 30 | /** 31 | * An Exception for problems communicating with a proxied service. 32 | * 33 | * @class CAS_ProxiedService_Exception 34 | * @category Authentication 35 | * @package PhpCAS 36 | * @author Adam Franco 37 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 38 | * @link https://wiki.jasig.org/display/CASC/phpCAS 39 | */ 40 | class CAS_ProxiedService_Exception 41 | extends Exception 42 | implements CAS_Exception 43 | { 44 | 45 | } 46 | ?> 47 | -------------------------------------------------------------------------------- /vendor/apereo/phpcas/source/CAS/ProxyChain/Interface.php: -------------------------------------------------------------------------------- 1 | 26 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 27 | * @link https://wiki.jasig.org/display/CASC/phpCAS 28 | */ 29 | 30 | /** 31 | * An interface for classes that define a list of allowed proxies in front of 32 | * the current application. 33 | * 34 | * @class CAS_ProxyChain_Interface 35 | * @category Authentication 36 | * @package PhpCAS 37 | * @author Adam Franco 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * @link https://wiki.jasig.org/display/CASC/phpCAS 40 | */ 41 | interface CAS_ProxyChain_Interface 42 | { 43 | 44 | /** 45 | * Match a list of proxies. 46 | * 47 | * @param array $list The list of proxies in front of this service. 48 | * 49 | * @return bool 50 | */ 51 | public function matches(array $list); 52 | 53 | } 54 | -------------------------------------------------------------------------------- /vendor/apereo/phpcas/source/CAS/ProxyChain/Trusted.php: -------------------------------------------------------------------------------- 1 | 26 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 27 | * @link https://wiki.jasig.org/display/CASC/phpCAS 28 | */ 29 | 30 | /** 31 | * A proxy-chain definition that defines a chain up to a trusted proxy and 32 | * delegates the resposibility of validating the rest of the chain to that 33 | * trusted proxy. 34 | * 35 | * @class CAS_ProxyChain_Trusted 36 | * @category Authentication 37 | * @package PhpCAS 38 | * @author Adam Franco 39 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 40 | * @link https://wiki.jasig.org/display/CASC/phpCAS 41 | */ 42 | class CAS_ProxyChain_Trusted 43 | extends CAS_ProxyChain 44 | implements CAS_ProxyChain_Interface 45 | { 46 | 47 | /** 48 | * Validate the size of the the list as compared to our chain. 49 | * 50 | * @param array $list list of proxies 51 | * 52 | * @return bool 53 | */ 54 | protected function isSizeValid (array $list) 55 | { 56 | return (sizeof($this->chain) <= sizeof($list)); 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /vendor/apereo/phpcas/source/CAS/Request/Exception.php: -------------------------------------------------------------------------------- 1 | 26 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 27 | * @link https://wiki.jasig.org/display/CASC/phpCAS 28 | */ 29 | 30 | /** 31 | * An Exception for problems performing requests 32 | * 33 | * @class CAS_Request_Exception 34 | * @category Authentication 35 | * @package PhpCAS 36 | * @author Adam Franco 37 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 38 | * @link https://wiki.jasig.org/display/CASC/phpCAS 39 | */ 40 | class CAS_Request_Exception 41 | extends Exception 42 | implements CAS_Exception 43 | { 44 | 45 | } 46 | -------------------------------------------------------------------------------- /vendor/apereo/phpcas/source/CAS/ServiceBaseUrl/Interface.php: -------------------------------------------------------------------------------- 1 | 26 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 27 | * @link https://wiki.jasig.org/display/CASC/phpCAS 28 | */ 29 | 30 | /** 31 | * An interface for classes that gets the server name of the PHP server. 32 | * This is used to generate service URL and PGT callback URL. 33 | * 34 | * @class CAS_ServiceBaseUrl_Interface 35 | * @category Authentication 36 | * @package PhpCAS 37 | * @author Henry Pan 38 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 39 | * @link https://wiki.jasig.org/display/CASC/phpCAS 40 | */ 41 | interface CAS_ServiceBaseUrl_Interface 42 | { 43 | 44 | /** 45 | * Get PHP HTTP protocol and server name. 46 | * 47 | * @return string protocol, server hostname, and optionally port, 48 | * without trailing slash (https://localhost:8443) 49 | */ 50 | public function get(); 51 | 52 | /** 53 | * Check whether HTTPS is used. 54 | * 55 | * This is used to construct the protocol in the URL. 56 | * 57 | * @return bool true if HTTPS is used 58 | */ 59 | public function isHttps(); 60 | 61 | } 62 | -------------------------------------------------------------------------------- /vendor/apereo/phpcas/source/CAS/Session/PhpSession.php: -------------------------------------------------------------------------------- 1 | 27 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 28 | * @link https://wiki.jasig.org/display/CASC/phpCAS 29 | */ 30 | 31 | /** 32 | * Empty class used as a default implementation for phpCAS. 33 | * 34 | * Implements the standard PHP session handler without no alterations. 35 | * 36 | * @class CAS_Session_PhpSession 37 | * @category Authentication 38 | * @package PhpCAS 39 | * @author Adam Franco 40 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 41 | * @link https://wiki.jasig.org/display/CASC/phpCAS 42 | */ 43 | class CAS_Session_PhpSession extends SessionHandler implements SessionHandlerInterface 44 | { 45 | } 46 | -------------------------------------------------------------------------------- /vendor/autoload.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', 10 | '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', 11 | '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', 12 | '344f11dc3484aaed5cbde58e23513be4' => $vendorDir . '/apereo/phpcas/source/CAS.php', 13 | ); 14 | -------------------------------------------------------------------------------- /vendor/composer/autoload_namespaces.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/robrichards/xmlseclibs/src'), 10 | 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src'), 11 | 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'), 12 | 'Psr\\Clock\\' => array($vendorDir . '/psr/clock/src'), 13 | 'ParagonIE\\ConstantTime\\' => array($vendorDir . '/paragonie/constant_time_encoding/src'), 14 | 'OneLogin\\' => array($vendorDir . '/onelogin/php-saml/src'), 15 | 'OTPHP\\' => array($vendorDir . '/spomky-labs/otphp/src'), 16 | 'League\\OAuth2\\Client\\' => array($vendorDir . '/league/oauth2-client/src'), 17 | 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), 18 | 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'), 19 | 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'), 20 | ); 21 | -------------------------------------------------------------------------------- /vendor/composer/autoload_real.php: -------------------------------------------------------------------------------- 1 | register(true); 35 | 36 | $filesToLoad = \Composer\Autoload\ComposerStaticInitafdf4419c977e377e00fce23bd5a0744::$files; 37 | $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { 38 | if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { 39 | $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; 40 | 41 | require $file; 42 | } 43 | }, null, null); 44 | foreach ($filesToLoad as $fileIdentifier => $file) { 45 | $requireFile($fileIdentifier, $file); 46 | } 47 | 48 | return $loader; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /vendor/composer/platform_check.php: -------------------------------------------------------------------------------- 1 | = 80100)) { 8 | $issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.'; 9 | } 10 | 11 | if ($issues) { 12 | if (!headers_sent()) { 13 | header('HTTP/1.1 500 Internal Server Error'); 14 | } 15 | if (!ini_get('display_errors')) { 16 | if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 17 | fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); 18 | } elseif (!headers_sent()) { 19 | echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; 20 | } 21 | } 22 | trigger_error( 23 | 'Composer detected issues in your platform: ' . implode(' ', $issues), 24 | E_USER_ERROR 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /vendor/guzzlehttp/guzzle/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011 Michael Dowling 4 | Copyright (c) 2012 Jeremy Lindblom 5 | Copyright (c) 2014 Graham Campbell 6 | Copyright (c) 2015 Márk Sági-Kazár 7 | Copyright (c) 2015 Tobias Schultze 8 | Copyright (c) 2016 Tobias Nyholm 9 | Copyright (c) 2016 George Mponos 10 | 11 | Permission is hereby granted, free of charge, to any person obtaining a copy 12 | of this software and associated documentation files (the "Software"), to deal 13 | in the Software without restriction, including without limitation the rights 14 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | copies of the Software, and to permit persons to whom the Software is 16 | furnished to do so, subject to the following conditions: 17 | 18 | The above copyright notice and this permission notice shall be included in 19 | all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | THE SOFTWARE. 28 | -------------------------------------------------------------------------------- /vendor/guzzlehttp/guzzle/src/BodySummarizer.php: -------------------------------------------------------------------------------- 1 | truncateAt = $truncateAt; 17 | } 18 | 19 | /** 20 | * Returns a summarized message body. 21 | */ 22 | public function summarize(MessageInterface $message): ?string 23 | { 24 | return $this->truncateAt === null 25 | ? Psr7\Message::bodySummary($message) 26 | : Psr7\Message::bodySummary($message, $this->truncateAt); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php: -------------------------------------------------------------------------------- 1 | request = $request; 33 | $this->handlerContext = $handlerContext; 34 | } 35 | 36 | /** 37 | * Get the request that caused the exception 38 | */ 39 | public function getRequest(): RequestInterface 40 | { 41 | return $this->request; 42 | } 43 | 44 | /** 45 | * Get contextual information about the error from the underlying handler. 46 | * 47 | * The contents of this array will vary depending on which handler you are 48 | * using. It may also be just an empty array. Relying on this data will 49 | * couple you to a specific handler, but can give more debug information 50 | * when needed. 51 | */ 52 | public function getHandlerContext(): array 53 | { 54 | return $this->handlerContext; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php: -------------------------------------------------------------------------------- 1 | factory = $options['handle_factory'] 34 | ?? new CurlFactory(3); 35 | } 36 | 37 | public function __invoke(RequestInterface $request, array $options): PromiseInterface 38 | { 39 | if (isset($options['delay'])) { 40 | \usleep($options['delay'] * 1000); 41 | } 42 | 43 | $easy = $this->factory->create($request, $options); 44 | \curl_exec($easy->handle); 45 | $easy->errno = \curl_errno($easy->handle); 46 | 47 | return CurlFactory::finish($this, $easy, $this->factory); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php: -------------------------------------------------------------------------------- 1 | 4 | Copyright (c) 2015 Graham Campbell 5 | Copyright (c) 2017 Tobias Schultze 6 | Copyright (c) 2020 Tobias Nyholm 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | -------------------------------------------------------------------------------- /vendor/guzzlehttp/promises/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "guzzlehttp/promises", 3 | "description": "Guzzle promises library", 4 | "keywords": ["promise"], 5 | "license": "MIT", 6 | "authors": [ 7 | { 8 | "name": "Graham Campbell", 9 | "email": "hello@gjcampbell.co.uk", 10 | "homepage": "https://github.com/GrahamCampbell" 11 | }, 12 | { 13 | "name": "Michael Dowling", 14 | "email": "mtdowling@gmail.com", 15 | "homepage": "https://github.com/mtdowling" 16 | }, 17 | { 18 | "name": "Tobias Nyholm", 19 | "email": "tobias.nyholm@gmail.com", 20 | "homepage": "https://github.com/Nyholm" 21 | }, 22 | { 23 | "name": "Tobias Schultze", 24 | "email": "webmaster@tubo-world.de", 25 | "homepage": "https://github.com/Tobion" 26 | } 27 | ], 28 | "require": { 29 | "php": "^7.2.5 || ^8.0" 30 | }, 31 | "require-dev": { 32 | "bamarni/composer-bin-plugin": "^1.8.2", 33 | "phpunit/phpunit": "^8.5.39 || ^9.6.20" 34 | }, 35 | "autoload": { 36 | "psr-4": { 37 | "GuzzleHttp\\Promise\\": "src/" 38 | } 39 | }, 40 | "autoload-dev": { 41 | "psr-4": { 42 | "GuzzleHttp\\Promise\\Tests\\": "tests/" 43 | } 44 | }, 45 | "extra": { 46 | "bamarni-bin": { 47 | "bin-links": true, 48 | "forward-command": false 49 | } 50 | }, 51 | "config": { 52 | "allow-plugins": { 53 | "bamarni/composer-bin-plugin": true 54 | }, 55 | "preferred-install": "dist", 56 | "sort-packages": true 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /vendor/guzzlehttp/promises/src/AggregateException.php: -------------------------------------------------------------------------------- 1 | getState() === PromiseInterface::PENDING; 15 | } 16 | 17 | /** 18 | * Returns true if a promise is fulfilled or rejected. 19 | */ 20 | public static function settled(PromiseInterface $promise): bool 21 | { 22 | return $promise->getState() !== PromiseInterface::PENDING; 23 | } 24 | 25 | /** 26 | * Returns true if a promise is fulfilled. 27 | */ 28 | public static function fulfilled(PromiseInterface $promise): bool 29 | { 30 | return $promise->getState() === PromiseInterface::FULFILLED; 31 | } 32 | 33 | /** 34 | * Returns true if a promise is rejected. 35 | */ 36 | public static function rejected(PromiseInterface $promise): bool 37 | { 38 | return $promise->getState() === PromiseInterface::REJECTED; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /vendor/guzzlehttp/promises/src/PromisorInterface.php: -------------------------------------------------------------------------------- 1 | reason = $reason; 24 | 25 | $message = 'The promise was rejected'; 26 | 27 | if ($description) { 28 | $message .= ' with reason: '.$description; 29 | } elseif (is_string($reason) 30 | || (is_object($reason) && method_exists($reason, '__toString')) 31 | ) { 32 | $message .= ' with reason: '.$this->reason; 33 | } elseif ($reason instanceof \JsonSerializable) { 34 | $message .= ' with reason: '.json_encode($this->reason, JSON_PRETTY_PRINT); 35 | } 36 | 37 | parent::__construct($message); 38 | } 39 | 40 | /** 41 | * Returns the rejection reason. 42 | * 43 | * @return mixed 44 | */ 45 | public function getReason() 46 | { 47 | return $this->reason; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /vendor/guzzlehttp/promises/src/TaskQueueInterface.php: -------------------------------------------------------------------------------- 1 | 4 | Copyright (c) 2015 Márk Sági-Kazár 5 | Copyright (c) 2015 Graham Campbell 6 | Copyright (c) 2016 Tobias Schultze 7 | Copyright (c) 2016 George Mponos 8 | Copyright (c) 2018 Tobias Nyholm 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in 18 | all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 26 | THE SOFTWARE. 27 | -------------------------------------------------------------------------------- /vendor/guzzlehttp/psr7/src/DroppingStream.php: -------------------------------------------------------------------------------- 1 | stream = $stream; 30 | $this->maxLength = $maxLength; 31 | } 32 | 33 | public function write($string): int 34 | { 35 | $diff = $this->maxLength - $this->stream->getSize(); 36 | 37 | // Begin returning 0 when the underlying stream is too large. 38 | if ($diff <= 0) { 39 | return 0; 40 | } 41 | 42 | // Write the stream or a subset of the stream if needed. 43 | if (strlen($string) < $diff) { 44 | return $this->stream->write($string); 45 | } 46 | 47 | return $this->stream->write(substr($string, 0, $diff)); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /vendor/guzzlehttp/psr7/src/Exception/MalformedUriException.php: -------------------------------------------------------------------------------- 1 | 15 + 32]); 35 | $this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource)); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/guzzlehttp/psr7/src/LazyOpenStream.php: -------------------------------------------------------------------------------- 1 | filename = $filename; 35 | $this->mode = $mode; 36 | 37 | // unsetting the property forces the first access to go through 38 | // __get(). 39 | unset($this->stream); 40 | } 41 | 42 | /** 43 | * Creates the underlying stream lazily when required. 44 | */ 45 | protected function createStream(): StreamInterface 46 | { 47 | return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode)); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /vendor/guzzlehttp/psr7/src/NoSeekStream.php: -------------------------------------------------------------------------------- 1 | @,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m"; 22 | public const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)"; 23 | } 24 | -------------------------------------------------------------------------------- /vendor/guzzlehttp/psr7/src/UriComparator.php: -------------------------------------------------------------------------------- 1 | getHost(), $modified->getHost()) !== 0) { 23 | return true; 24 | } 25 | 26 | if ($original->getScheme() !== $modified->getScheme()) { 27 | return true; 28 | } 29 | 30 | if (self::computePort($original) !== self::computePort($modified)) { 31 | return true; 32 | } 33 | 34 | return false; 35 | } 36 | 37 | private static function computePort(UriInterface $uri): int 38 | { 39 | $port = $uri->getPort(); 40 | 41 | if (null !== $port) { 42 | return $port; 43 | } 44 | 45 | return 'https' === $uri->getScheme() ? 443 : 80; 46 | } 47 | 48 | private function __construct() 49 | { 50 | // cannot be instantiated 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /vendor/league/oauth2-client/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013-2020 Alex Bilbie 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/league/oauth2-client/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "league/oauth2-client", 3 | "description": "OAuth 2.0 Client Library", 4 | "license": "MIT", 5 | "config": { 6 | "sort-packages": true 7 | }, 8 | "require": { 9 | "php": "^5.6 || ^7.0 || ^8.0", 10 | "guzzlehttp/guzzle": "^6.0 || ^7.0", 11 | "paragonie/random_compat": "^1 || ^2 || ^9.99" 12 | }, 13 | "require-dev": { 14 | "mockery/mockery": "^1.3.5", 15 | "php-parallel-lint/php-parallel-lint": "^1.3.1", 16 | "phpunit/phpunit": "^5.7 || ^6.0 || ^9.5", 17 | "squizlabs/php_codesniffer": "^2.3 || ^3.0" 18 | }, 19 | "keywords": [ 20 | "oauth", 21 | "oauth2", 22 | "authorization", 23 | "authentication", 24 | "idp", 25 | "identity", 26 | "sso", 27 | "single sign on" 28 | ], 29 | "authors": [ 30 | { 31 | "name": "Alex Bilbie", 32 | "email": "hello@alexbilbie.com", 33 | "homepage": "http://www.alexbilbie.com", 34 | "role": "Developer" 35 | }, 36 | { 37 | "name": "Woody Gilk", 38 | "homepage": "https://github.com/shadowhand", 39 | "role": "Contributor" 40 | } 41 | 42 | ], 43 | "autoload": { 44 | "psr-4": { 45 | "League\\OAuth2\\Client\\": "src/" 46 | } 47 | }, 48 | "autoload-dev": { 49 | "psr-4": { 50 | "League\\OAuth2\\Client\\Test\\": "test/src/" 51 | } 52 | }, 53 | "extra": { 54 | "branch-alias": { 55 | "dev-2.x": "2.0.x-dev" 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /vendor/league/oauth2-client/src/Grant/AuthorizationCode.php: -------------------------------------------------------------------------------- 1 | 9 | * @license http://opensource.org/licenses/MIT MIT 10 | * @link http://thephpleague.com/oauth2-client/ Documentation 11 | * @link https://packagist.org/packages/league/oauth2-client Packagist 12 | * @link https://github.com/thephpleague/oauth2-client GitHub 13 | */ 14 | 15 | namespace League\OAuth2\Client\Grant; 16 | 17 | /** 18 | * Represents an authorization code grant. 19 | * 20 | * @link http://tools.ietf.org/html/rfc6749#section-1.3.1 Authorization Code (RFC 6749, §1.3.1) 21 | */ 22 | class AuthorizationCode extends AbstractGrant 23 | { 24 | /** 25 | * @inheritdoc 26 | */ 27 | protected function getName() 28 | { 29 | return 'authorization_code'; 30 | } 31 | 32 | /** 33 | * @inheritdoc 34 | */ 35 | protected function getRequiredRequestParameters() 36 | { 37 | return [ 38 | 'code', 39 | ]; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /vendor/league/oauth2-client/src/Grant/ClientCredentials.php: -------------------------------------------------------------------------------- 1 | 9 | * @license http://opensource.org/licenses/MIT MIT 10 | * @link http://thephpleague.com/oauth2-client/ Documentation 11 | * @link https://packagist.org/packages/league/oauth2-client Packagist 12 | * @link https://github.com/thephpleague/oauth2-client GitHub 13 | */ 14 | 15 | namespace League\OAuth2\Client\Grant; 16 | 17 | /** 18 | * Represents a client credentials grant. 19 | * 20 | * @link http://tools.ietf.org/html/rfc6749#section-1.3.4 Client Credentials (RFC 6749, §1.3.4) 21 | */ 22 | class ClientCredentials extends AbstractGrant 23 | { 24 | /** 25 | * @inheritdoc 26 | */ 27 | protected function getName() 28 | { 29 | return 'client_credentials'; 30 | } 31 | 32 | /** 33 | * @inheritdoc 34 | */ 35 | protected function getRequiredRequestParameters() 36 | { 37 | return []; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vendor/league/oauth2-client/src/Grant/Exception/InvalidGrantException.php: -------------------------------------------------------------------------------- 1 | 9 | * @license http://opensource.org/licenses/MIT MIT 10 | * @link http://thephpleague.com/oauth2-client/ Documentation 11 | * @link https://packagist.org/packages/league/oauth2-client Packagist 12 | * @link https://github.com/thephpleague/oauth2-client GitHub 13 | */ 14 | 15 | namespace League\OAuth2\Client\Grant\Exception; 16 | 17 | use InvalidArgumentException; 18 | 19 | /** 20 | * Exception thrown if the grant does not extend from AbstractGrant. 21 | * 22 | * @see League\OAuth2\Client\Grant\AbstractGrant 23 | */ 24 | class InvalidGrantException extends InvalidArgumentException 25 | { 26 | } 27 | -------------------------------------------------------------------------------- /vendor/league/oauth2-client/src/Grant/Password.php: -------------------------------------------------------------------------------- 1 | 9 | * @license http://opensource.org/licenses/MIT MIT 10 | * @link http://thephpleague.com/oauth2-client/ Documentation 11 | * @link https://packagist.org/packages/league/oauth2-client Packagist 12 | * @link https://github.com/thephpleague/oauth2-client GitHub 13 | */ 14 | 15 | namespace League\OAuth2\Client\Grant; 16 | 17 | /** 18 | * Represents a resource owner password credentials grant. 19 | * 20 | * @link http://tools.ietf.org/html/rfc6749#section-1.3.3 Resource Owner Password Credentials (RFC 6749, §1.3.3) 21 | */ 22 | class Password extends AbstractGrant 23 | { 24 | /** 25 | * @inheritdoc 26 | */ 27 | protected function getName() 28 | { 29 | return 'password'; 30 | } 31 | 32 | /** 33 | * @inheritdoc 34 | */ 35 | protected function getRequiredRequestParameters() 36 | { 37 | return [ 38 | 'username', 39 | 'password', 40 | ]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /vendor/league/oauth2-client/src/Grant/RefreshToken.php: -------------------------------------------------------------------------------- 1 | 9 | * @license http://opensource.org/licenses/MIT MIT 10 | * @link http://thephpleague.com/oauth2-client/ Documentation 11 | * @link https://packagist.org/packages/league/oauth2-client Packagist 12 | * @link https://github.com/thephpleague/oauth2-client GitHub 13 | */ 14 | 15 | namespace League\OAuth2\Client\Grant; 16 | 17 | /** 18 | * Represents a refresh token grant. 19 | * 20 | * @link http://tools.ietf.org/html/rfc6749#section-6 Refreshing an Access Token (RFC 6749, §6) 21 | */ 22 | class RefreshToken extends AbstractGrant 23 | { 24 | /** 25 | * @inheritdoc 26 | */ 27 | protected function getName() 28 | { 29 | return 'refresh_token'; 30 | } 31 | 32 | /** 33 | * @inheritdoc 34 | */ 35 | protected function getRequiredRequestParameters() 36 | { 37 | return [ 38 | 'refresh_token', 39 | ]; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /vendor/league/oauth2-client/src/OptionProvider/HttpBasicAuthOptionProvider.php: -------------------------------------------------------------------------------- 1 | 9 | * @license http://opensource.org/licenses/MIT MIT 10 | * @link http://thephpleague.com/oauth2-client/ Documentation 11 | * @link https://packagist.org/packages/league/oauth2-client Packagist 12 | * @link https://github.com/thephpleague/oauth2-client GitHub 13 | */ 14 | 15 | namespace League\OAuth2\Client\OptionProvider; 16 | 17 | use InvalidArgumentException; 18 | 19 | /** 20 | * Add http basic auth into access token request options 21 | * @link https://tools.ietf.org/html/rfc6749#section-2.3.1 22 | */ 23 | class HttpBasicAuthOptionProvider extends PostAuthOptionProvider 24 | { 25 | /** 26 | * @inheritdoc 27 | */ 28 | public function getAccessTokenOptions($method, array $params) 29 | { 30 | if (empty($params['client_id']) || empty($params['client_secret'])) { 31 | throw new InvalidArgumentException('clientId and clientSecret are required for http basic auth'); 32 | } 33 | 34 | $encodedCredentials = base64_encode(sprintf('%s:%s', $params['client_id'], $params['client_secret'])); 35 | unset($params['client_id'], $params['client_secret']); 36 | 37 | $options = parent::getAccessTokenOptions($method, $params); 38 | $options['headers']['Authorization'] = 'Basic ' . $encodedCredentials; 39 | 40 | return $options; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /vendor/league/oauth2-client/src/OptionProvider/OptionProviderInterface.php: -------------------------------------------------------------------------------- 1 | 9 | * @license http://opensource.org/licenses/MIT MIT 10 | * @link http://thephpleague.com/oauth2-client/ Documentation 11 | * @link https://packagist.org/packages/league/oauth2-client Packagist 12 | * @link https://github.com/thephpleague/oauth2-client GitHub 13 | */ 14 | 15 | namespace League\OAuth2\Client\OptionProvider; 16 | 17 | /** 18 | * Interface for access token options provider 19 | */ 20 | interface OptionProviderInterface 21 | { 22 | /** 23 | * Builds request options used for requesting an access token. 24 | * 25 | * @param string $method 26 | * @param array $params 27 | * @return array 28 | */ 29 | public function getAccessTokenOptions($method, array $params); 30 | } 31 | -------------------------------------------------------------------------------- /vendor/league/oauth2-client/src/OptionProvider/PostAuthOptionProvider.php: -------------------------------------------------------------------------------- 1 | 9 | * @license http://opensource.org/licenses/MIT MIT 10 | * @link http://thephpleague.com/oauth2-client/ Documentation 11 | * @link https://packagist.org/packages/league/oauth2-client Packagist 12 | * @link https://github.com/thephpleague/oauth2-client GitHub 13 | */ 14 | 15 | namespace League\OAuth2\Client\OptionProvider; 16 | 17 | use League\OAuth2\Client\Provider\AbstractProvider; 18 | use League\OAuth2\Client\Tool\QueryBuilderTrait; 19 | 20 | /** 21 | * Provide options for access token 22 | */ 23 | class PostAuthOptionProvider implements OptionProviderInterface 24 | { 25 | use QueryBuilderTrait; 26 | 27 | /** 28 | * @inheritdoc 29 | */ 30 | public function getAccessTokenOptions($method, array $params) 31 | { 32 | $options = ['headers' => ['content-type' => 'application/x-www-form-urlencoded']]; 33 | 34 | if ($method === AbstractProvider::METHOD_POST) { 35 | $options['body'] = $this->getAccessTokenBody($params); 36 | } 37 | 38 | return $options; 39 | } 40 | 41 | /** 42 | * Returns the request body for requesting an access token. 43 | * 44 | * @param array $params 45 | * @return string 46 | */ 47 | protected function getAccessTokenBody(array $params) 48 | { 49 | return $this->buildQueryString($params); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /vendor/league/oauth2-client/src/Provider/Exception/IdentityProviderException.php: -------------------------------------------------------------------------------- 1 | 9 | * @license http://opensource.org/licenses/MIT MIT 10 | * @link http://thephpleague.com/oauth2-client/ Documentation 11 | * @link https://packagist.org/packages/league/oauth2-client Packagist 12 | * @link https://github.com/thephpleague/oauth2-client GitHub 13 | */ 14 | 15 | namespace League\OAuth2\Client\Provider\Exception; 16 | 17 | /** 18 | * Exception thrown if the provider response contains errors. 19 | */ 20 | class IdentityProviderException extends \Exception 21 | { 22 | /** 23 | * @var mixed 24 | */ 25 | protected $response; 26 | 27 | /** 28 | * @param string $message 29 | * @param int $code 30 | * @param mixed $response The response body 31 | */ 32 | public function __construct($message, $code, $response) 33 | { 34 | $this->response = $response; 35 | 36 | parent::__construct($message, $code); 37 | } 38 | 39 | /** 40 | * Returns the exception's response body. 41 | * 42 | * @return mixed 43 | */ 44 | public function getResponseBody() 45 | { 46 | return $this->response; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /vendor/league/oauth2-client/src/Provider/GenericResourceOwner.php: -------------------------------------------------------------------------------- 1 | 9 | * @license http://opensource.org/licenses/MIT MIT 10 | * @link http://thephpleague.com/oauth2-client/ Documentation 11 | * @link https://packagist.org/packages/league/oauth2-client Packagist 12 | * @link https://github.com/thephpleague/oauth2-client GitHub 13 | */ 14 | 15 | namespace League\OAuth2\Client\Provider; 16 | 17 | /** 18 | * Represents a generic resource owner for use with the GenericProvider. 19 | */ 20 | class GenericResourceOwner implements ResourceOwnerInterface 21 | { 22 | /** 23 | * @var array 24 | */ 25 | protected $response; 26 | 27 | /** 28 | * @var string 29 | */ 30 | protected $resourceOwnerId; 31 | 32 | /** 33 | * @param array $response 34 | * @param string $resourceOwnerId 35 | */ 36 | public function __construct(array $response, $resourceOwnerId) 37 | { 38 | $this->response = $response; 39 | $this->resourceOwnerId = $resourceOwnerId; 40 | } 41 | 42 | /** 43 | * Returns the identifier of the authorized resource owner. 44 | * 45 | * @return mixed 46 | */ 47 | public function getId() 48 | { 49 | return $this->response[$this->resourceOwnerId]; 50 | } 51 | 52 | /** 53 | * Returns the raw resource owner response. 54 | * 55 | * @return array 56 | */ 57 | public function toArray() 58 | { 59 | return $this->response; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /vendor/league/oauth2-client/src/Provider/ResourceOwnerInterface.php: -------------------------------------------------------------------------------- 1 | 9 | * @license http://opensource.org/licenses/MIT MIT 10 | * @link http://thephpleague.com/oauth2-client/ Documentation 11 | * @link https://packagist.org/packages/league/oauth2-client Packagist 12 | * @link https://github.com/thephpleague/oauth2-client GitHub 13 | */ 14 | 15 | namespace League\OAuth2\Client\Provider; 16 | 17 | /** 18 | * Classes implementing `ResourceOwnerInterface` may be used to represent 19 | * the resource owner authenticated with a service provider. 20 | */ 21 | interface ResourceOwnerInterface 22 | { 23 | /** 24 | * Returns the identifier of the authorized resource owner. 25 | * 26 | * @return mixed 27 | */ 28 | public function getId(); 29 | 30 | /** 31 | * Return all of the owner details available as an array. 32 | * 33 | * @return array 34 | */ 35 | public function toArray(); 36 | } 37 | -------------------------------------------------------------------------------- /vendor/league/oauth2-client/src/Token/AccessTokenInterface.php: -------------------------------------------------------------------------------- 1 | 9 | * @license http://opensource.org/licenses/MIT MIT 10 | * @link http://thephpleague.com/oauth2-client/ Documentation 11 | * @link https://packagist.org/packages/league/oauth2-client Packagist 12 | * @link https://github.com/thephpleague/oauth2-client GitHub 13 | */ 14 | 15 | namespace League\OAuth2\Client\Token; 16 | 17 | use JsonSerializable; 18 | use ReturnTypeWillChange; 19 | use RuntimeException; 20 | 21 | interface AccessTokenInterface extends JsonSerializable 22 | { 23 | /** 24 | * Returns the access token string of this instance. 25 | * 26 | * @return string 27 | */ 28 | public function getToken(); 29 | 30 | /** 31 | * Returns the refresh token, if defined. 32 | * 33 | * @return string|null 34 | */ 35 | public function getRefreshToken(); 36 | 37 | /** 38 | * Returns the expiration timestamp in seconds, if defined. 39 | * 40 | * @return integer|null 41 | */ 42 | public function getExpires(); 43 | 44 | /** 45 | * Checks if this token has expired. 46 | * 47 | * @return boolean true if the token has expired, false otherwise. 48 | * @throws RuntimeException if 'expires' is not set on the token. 49 | */ 50 | public function hasExpired(); 51 | 52 | /** 53 | * Returns additional vendor values stored in the token. 54 | * 55 | * @return array 56 | */ 57 | public function getValues(); 58 | 59 | /** 60 | * Returns a string representation of the access token 61 | * 62 | * @return string 63 | */ 64 | public function __toString(); 65 | 66 | /** 67 | * Returns an array of parameters to serialize when this is serialized with 68 | * json_encode(). 69 | * 70 | * @return array 71 | */ 72 | #[ReturnTypeWillChange] 73 | public function jsonSerialize(); 74 | } 75 | -------------------------------------------------------------------------------- /vendor/league/oauth2-client/src/Token/ResourceOwnerAccessTokenInterface.php: -------------------------------------------------------------------------------- 1 | 9 | * @license http://opensource.org/licenses/MIT MIT 10 | * @link http://thephpleague.com/oauth2-client/ Documentation 11 | * @link https://packagist.org/packages/league/oauth2-client Packagist 12 | * @link https://github.com/thephpleague/oauth2-client GitHub 13 | */ 14 | 15 | namespace League\OAuth2\Client\Token; 16 | 17 | interface ResourceOwnerAccessTokenInterface extends AccessTokenInterface 18 | { 19 | /** 20 | * Returns the resource owner identifier, if defined. 21 | * 22 | * @return string|null 23 | */ 24 | public function getResourceOwnerId(); 25 | } 26 | -------------------------------------------------------------------------------- /vendor/league/oauth2-client/src/Tool/ArrayAccessorTrait.php: -------------------------------------------------------------------------------- 1 | 9 | * @license http://opensource.org/licenses/MIT MIT 10 | * @link http://thephpleague.com/oauth2-client/ Documentation 11 | * @link https://packagist.org/packages/league/oauth2-client Packagist 12 | * @link https://github.com/thephpleague/oauth2-client GitHub 13 | */ 14 | 15 | namespace League\OAuth2\Client\Tool; 16 | 17 | /** 18 | * Provides generic array navigation tools. 19 | */ 20 | trait ArrayAccessorTrait 21 | { 22 | /** 23 | * Returns a value by key using dot notation. 24 | * 25 | * @param array $data 26 | * @param string $key 27 | * @param mixed|null $default 28 | * @return mixed 29 | */ 30 | private function getValueByKey(array $data, $key, $default = null) 31 | { 32 | if (!is_string($key) || empty($key) || !count($data)) { 33 | return $default; 34 | } 35 | 36 | if (strpos($key, '.') !== false) { 37 | $keys = explode('.', $key); 38 | 39 | foreach ($keys as $innerKey) { 40 | if (!is_array($data) || !array_key_exists($innerKey, $data)) { 41 | return $default; 42 | } 43 | 44 | $data = $data[$innerKey]; 45 | } 46 | 47 | return $data; 48 | } 49 | 50 | return array_key_exists($key, $data) ? $data[$key] : $default; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /vendor/league/oauth2-client/src/Tool/BearerAuthorizationTrait.php: -------------------------------------------------------------------------------- 1 | 9 | * @license http://opensource.org/licenses/MIT MIT 10 | * @link http://thephpleague.com/oauth2-client/ Documentation 11 | * @link https://packagist.org/packages/league/oauth2-client Packagist 12 | * @link https://github.com/thephpleague/oauth2-client GitHub 13 | */ 14 | 15 | namespace League\OAuth2\Client\Tool; 16 | 17 | use League\OAuth2\Client\Token\AccessTokenInterface; 18 | 19 | /** 20 | * Enables `Bearer` header authorization for providers. 21 | * 22 | * @link http://tools.ietf.org/html/rfc6750 Bearer Token Usage (RFC 6750) 23 | */ 24 | trait BearerAuthorizationTrait 25 | { 26 | /** 27 | * Returns authorization headers for the 'bearer' grant. 28 | * 29 | * @param AccessTokenInterface|string|null $token Either a string or an access token instance 30 | * @return array 31 | */ 32 | protected function getAuthorizationHeaders($token = null) 33 | { 34 | return ['Authorization' => 'Bearer ' . $token]; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /vendor/league/oauth2-client/src/Tool/GuardedPropertyTrait.php: -------------------------------------------------------------------------------- 1 | 9 | * @license http://opensource.org/licenses/MIT MIT 10 | * @link http://thephpleague.com/oauth2-client/ Documentation 11 | * @link https://packagist.org/packages/league/oauth2-client Packagist 12 | * @link https://github.com/thephpleague/oauth2-client GitHub 13 | */ 14 | 15 | namespace League\OAuth2\Client\Tool; 16 | 17 | /** 18 | * Provides support for blacklisting explicit properties from the 19 | * mass assignment behavior. 20 | */ 21 | trait GuardedPropertyTrait 22 | { 23 | /** 24 | * The properties that aren't mass assignable. 25 | * 26 | * @var array 27 | */ 28 | protected $guarded = []; 29 | 30 | /** 31 | * Attempts to mass assign the given options to explicitly defined properties, 32 | * skipping over any properties that are defined in the guarded array. 33 | * 34 | * @param array $options 35 | * @return mixed 36 | */ 37 | protected function fillProperties(array $options = []) 38 | { 39 | if (isset($options['guarded'])) { 40 | unset($options['guarded']); 41 | } 42 | 43 | foreach ($options as $option => $value) { 44 | if (property_exists($this, $option) && !$this->isGuarded($option)) { 45 | $this->{$option} = $value; 46 | } 47 | } 48 | } 49 | 50 | /** 51 | * Returns current guarded properties. 52 | * 53 | * @return array 54 | */ 55 | public function getGuarded() 56 | { 57 | return $this->guarded; 58 | } 59 | 60 | /** 61 | * Determines if the given property is guarded. 62 | * 63 | * @param string $property 64 | * @return bool 65 | */ 66 | public function isGuarded($property) 67 | { 68 | return in_array($property, $this->getGuarded()); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /vendor/league/oauth2-client/src/Tool/QueryBuilderTrait.php: -------------------------------------------------------------------------------- 1 | 9 | * @license http://opensource.org/licenses/MIT MIT 10 | * @link http://thephpleague.com/oauth2-client/ Documentation 11 | * @link https://packagist.org/packages/league/oauth2-client Packagist 12 | * @link https://github.com/thephpleague/oauth2-client GitHub 13 | */ 14 | 15 | namespace League\OAuth2\Client\Tool; 16 | 17 | /** 18 | * Provides a standard way to generate query strings. 19 | */ 20 | trait QueryBuilderTrait 21 | { 22 | /** 23 | * Build a query string from an array. 24 | * 25 | * @param array $params 26 | * 27 | * @return string 28 | */ 29 | protected function buildQueryString(array $params) 30 | { 31 | return http_build_query($params, '', '&', \PHP_QUERY_RFC3986); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /vendor/league/oauth2-client/src/Tool/RequiredParameterTrait.php: -------------------------------------------------------------------------------- 1 | 9 | * @license http://opensource.org/licenses/MIT MIT 10 | * @link http://thephpleague.com/oauth2-client/ Documentation 11 | * @link https://packagist.org/packages/league/oauth2-client Packagist 12 | * @link https://github.com/thephpleague/oauth2-client GitHub 13 | */ 14 | 15 | namespace League\OAuth2\Client\Tool; 16 | 17 | use BadMethodCallException; 18 | 19 | /** 20 | * Provides functionality to check for required parameters. 21 | */ 22 | trait RequiredParameterTrait 23 | { 24 | /** 25 | * Checks for a required parameter in a hash. 26 | * 27 | * @throws BadMethodCallException 28 | * @param string $name 29 | * @param array $params 30 | * @return void 31 | */ 32 | private function checkRequiredParameter($name, array $params) 33 | { 34 | if (!isset($params[$name])) { 35 | throw new BadMethodCallException(sprintf( 36 | 'Required parameter not passed: "%s"', 37 | $name 38 | )); 39 | } 40 | } 41 | 42 | /** 43 | * Checks for multiple required parameters in a hash. 44 | * 45 | * @throws InvalidArgumentException 46 | * @param array $names 47 | * @param array $params 48 | * @return void 49 | */ 50 | private function checkRequiredParameters(array $names, array $params) 51 | { 52 | foreach ($names as $name) { 53 | $this->checkRequiredParameter($name, $params); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /vendor/onelogin/php-saml/.github/workflows/php-package.yml: -------------------------------------------------------------------------------- 1 | # This workflow will install PHP dependencies, run tests and lint with a variety of PHP versions 2 | # For more information see: https://github.com/marketplace/actions/setup-php-action 3 | 4 | name: php-saml 3.x package 5 | 6 | on: 7 | push: 8 | branches: [ 3.* ] 9 | pull_request: 10 | branches: [ 3.* ] 11 | 12 | jobs: 13 | test: 14 | runs-on: ${{ matrix.operating-system }} 15 | strategy: 16 | fail-fast: false 17 | matrix: 18 | operating-system: ['ubuntu-latest'] 19 | php-versions: [5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4] 20 | steps: 21 | - name: Setup PHP, with composer and extensions 22 | uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php 23 | with: 24 | php-version: ${{ matrix.php-versions }} 25 | extensions: mbstring, intl, mcrypt, xml 26 | tools: composer:v2 27 | ini-values: post_max_size=256M, max_execution_time=180 28 | coverage: xdebug2 29 | 30 | - name: Set git to use LF 31 | run: | 32 | git config --global core.autocrlf false 33 | git config --global core.eol lf 34 | - uses: actions/checkout@v2 35 | 36 | - name: Validate composer.json and composer.lock 37 | run: composer validate 38 | 39 | - name: Install Composer dependencies 40 | run: | 41 | composer self-update 42 | composer install --prefer-source --no-interaction 43 | - name: Syntax check PHP 44 | run: | 45 | php vendor/bin/phpcpd --exclude tests --exclude vendor . 46 | php vendor/bin/phploc src/. 47 | mkdir -p tests/build/dependences 48 | php vendor/bin/pdepend --summary-xml=tests/build/logs/dependence-summary.xml --jdepend-chart=tests/build/dependences/jdepend.svg --overview-pyramid=tests/build/dependences/pyramid.svg src/. 49 | 50 | - name: PHP Code Sniffer 51 | run: php vendor/bin/phpcs --standard=tests/ZendModStandard src/Saml2 demo1 demo2 endpoints tests/src 52 | 53 | - name: Run unit tests 54 | run: vendor/bin/phpunit --verbose --debug 55 | -------------------------------------------------------------------------------- /vendor/onelogin/php-saml/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010-2022 OneLogin, Inc. 2 | Copyright (c) 2023 IAM Digital Services, SL. 3 | 4 | Permission is hereby granted, free of charge, to any person 5 | obtaining a copy of this software and associated documentation 6 | files (the "Software"), to deal in the Software without 7 | restriction, including without limitation the rights to use, 8 | copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the 10 | Software is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /vendor/onelogin/php-saml/_toolkit_loader.php: -------------------------------------------------------------------------------- 1 | =5.4", 19 | "robrichards/xmlseclibs": ">=3.1.1" 20 | }, 21 | "require-dev": { 22 | "phpunit/phpunit": "<7.5.18", 23 | "php-coveralls/php-coveralls": "^1.0.2 || ^2.0", 24 | "sebastian/phpcpd": "^2.0 || ^3.0 || ^4.0", 25 | "phploc/phploc": "^2.1 || ^3.0 || ^4.0", 26 | "pdepend/pdepend": "^2.5.0", 27 | "squizlabs/php_codesniffer": "^3.1.1" 28 | }, 29 | "suggest": { 30 | "ext-openssl": "Install openssl lib in order to handle with x509 certs (require to support sign and encryption)", 31 | "ext-curl": "Install curl lib to be able to use the IdPMetadataParser for parsing remote XMLs", 32 | "ext-gettext": "Install gettext and php5-gettext libs to handle translations" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /vendor/onelogin/php-saml/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ./tests/src 5 | 6 | 7 | 8 | 9 | ./src 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /vendor/onelogin/php-saml/src/Saml2/Error.php: -------------------------------------------------------------------------------- 1 | 10 | * @license MIT https://github.com/SAML-Toolkits/php-saml/blob/master/LICENSE 11 | * @link https://github.com/SAML-Toolkits/php-saml 12 | */ 13 | 14 | namespace OneLogin\Saml2; 15 | 16 | use Exception; 17 | 18 | /** 19 | * Error class of SAML PHP Toolkit 20 | * 21 | * Defines the Error class 22 | */ 23 | class Error extends Exception 24 | { 25 | // Errors 26 | const SETTINGS_FILE_NOT_FOUND = 0; 27 | const SETTINGS_INVALID_SYNTAX = 1; 28 | const SETTINGS_INVALID = 2; 29 | const METADATA_SP_INVALID = 3; 30 | const SP_CERTS_NOT_FOUND = 4; 31 | // SP_CERTS_NOT_FOUND is deprecated, use CERT_NOT_FOUND instead 32 | const CERT_NOT_FOUND = 4; 33 | const REDIRECT_INVALID_URL = 5; 34 | const PUBLIC_CERT_FILE_NOT_FOUND = 6; 35 | const PRIVATE_KEY_FILE_NOT_FOUND = 7; 36 | const SAML_RESPONSE_NOT_FOUND = 8; 37 | const SAML_LOGOUTMESSAGE_NOT_FOUND = 9; 38 | const SAML_LOGOUTREQUEST_INVALID = 10; 39 | const SAML_LOGOUTRESPONSE_INVALID = 11; 40 | const SAML_SINGLE_LOGOUT_NOT_SUPPORTED = 12; 41 | const PRIVATE_KEY_NOT_FOUND = 13; 42 | const UNSUPPORTED_SETTINGS_OBJECT = 14; 43 | 44 | /** 45 | * Constructor 46 | * 47 | * @param string $msg Describes the error. 48 | * @param int $code The code error (defined in the error class). 49 | * @param array|null $args Arguments used in the message that describes the error. 50 | */ 51 | public function __construct($msg, $code = 0, $args = array()) 52 | { 53 | assert(is_string($msg)); 54 | assert(is_int($code)); 55 | 56 | if (!isset($args)) { 57 | $args = array(); 58 | } 59 | $params = array_merge(array($msg), $args); 60 | $message = call_user_func_array('sprintf', $params); 61 | 62 | parent::__construct($message, $code); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /vendor/onelogin/php-saml/src/Saml2/schemas/saml-schema-authn-context-2.0.xsd: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | Document identifier: saml-schema-authn-context-2.0 12 | Location: http://docs.oasis-open.org/security/saml/v2.0/ 13 | Revision history: 14 | V2.0 (March, 2005): 15 | New core authentication context schema for SAML V2.0. 16 | This is just an include of all types from the schema 17 | referred to in the include statement below. 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /vendor/onelogin/php-saml/src/Saml2/schemas/sstc-metadata-attr.xsd: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | Document title: SAML V2.0 Metadata Extention for Entity Attributes Schema 15 | Document identifier: sstc-metadata-attr.xsd 16 | Location: http://www.oasis-open.org/committees/documents.php?wg_abbrev=security 17 | Revision history: 18 | V1.0 (November 2008): 19 | Initial version. 20 | 21 | 22 | 23 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /vendor/onelogin/php-saml/src/Saml2/schemas/sstc-saml-attribute-ext.xsd: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | Document title: SAML V2.0 Attribute Extension Schema 13 | Document identifier: sstc-saml-attribute-ext.xsd 14 | Location: http://www.oasis-open.org/committees/documents.php?wg_abbrev=security 15 | Revision history: 16 | V1.0 (October 2008): 17 | Initial version. 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /vendor/onelogin/php-saml/src/Saml2/schemas/sstc-saml-metadata-algsupport-v1.0.xsd: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | Document title: Metadata Extension Schema for SAML V2.0 Metadata Profile for Algorithm Support Version 1.0 14 | Document identifier: sstc-saml-metadata-algsupport.xsd 15 | Location: http://docs.oasis-open.org/security/saml/Post2.0/ 16 | Revision history: 17 | V1.0 (June 2010): 18 | Initial version. 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /vendor/onelogin/php-saml/src/Saml2/version.json: -------------------------------------------------------------------------------- 1 | { 2 | "php-saml": { 3 | "version": "3.7.0", 4 | "released": "30/05/2024" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /vendor/paragonie/constant_time_encoding/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "paragonie/constant_time_encoding", 3 | "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", 4 | "keywords": [ 5 | "base64", 6 | "encoding", 7 | "rfc4648", 8 | "base32", 9 | "base16", 10 | "hex", 11 | "bin2hex", 12 | "hex2bin", 13 | "base64_encode", 14 | "base64_decode", 15 | "base32_encode", 16 | "base32_decode" 17 | ], 18 | "license": "MIT", 19 | "type": "library", 20 | "authors": [ 21 | { 22 | "name": "Paragon Initiative Enterprises", 23 | "email": "security@paragonie.com", 24 | "homepage": "https://paragonie.com", 25 | "role": "Maintainer" 26 | }, 27 | { 28 | "name": "Steve 'Sc00bz' Thomas", 29 | "email": "steve@tobtu.com", 30 | "homepage": "https://www.tobtu.com", 31 | "role": "Original Developer" 32 | } 33 | ], 34 | "support": { 35 | "issues": "https://github.com/paragonie/constant_time_encoding/issues", 36 | "email": "info@paragonie.com", 37 | "source": "https://github.com/paragonie/constant_time_encoding" 38 | }, 39 | "require": { 40 | "php": "^8" 41 | }, 42 | "require-dev": { 43 | "phpunit/phpunit": "^9", 44 | "vimeo/psalm": "^4|^5" 45 | }, 46 | "autoload": { 47 | "psr-4": { 48 | "ParagonIE\\ConstantTime\\": "src/" 49 | } 50 | }, 51 | "autoload-dev": { 52 | "psr-4": { 53 | "ParagonIE\\ConstantTime\\Tests\\": "tests/" 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /vendor/paragonie/constant_time_encoding/src/EncoderInterface.php: -------------------------------------------------------------------------------- 1 | = 7" 26 | }, 27 | "require-dev": { 28 | "vimeo/psalm": "^1", 29 | "phpunit/phpunit": "4.*|5.*" 30 | }, 31 | "suggest": { 32 | "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /vendor/paragonie/random_compat/dist/random_compat.phar.pubkey: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEEd+wCqJDrx5B4OldM0dQE0ZMX+lx1ZWm 3 | pui0SUqD4G29L3NGsz9UhJ/0HjBdbnkhIK5xviT0X5vtjacF6ajgcCArbTB+ds+p 4 | +h7Q084NuSuIpNb6YPfoUFgC/CL9kAoc 5 | -----END PUBLIC KEY----- 6 | -------------------------------------------------------------------------------- /vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP SIGNATURE----- 2 | Version: GnuPG v2.0.22 (MingW32) 3 | 4 | iQEcBAABAgAGBQJWtW1hAAoJEGuXocKCZATaJf0H+wbZGgskK1dcRTsuVJl9IWip 5 | QwGw/qIKI280SD6/ckoUMxKDCJiFuPR14zmqnS36k7N5UNPnpdTJTS8T11jttSpg 6 | 1LCmgpbEIpgaTah+cELDqFCav99fS+bEiAL5lWDAHBTE/XPjGVCqeehyPYref4IW 7 | NDBIEsvnHPHPLsn6X5jq4+Yj5oUixgxaMPiR+bcO4Sh+RzOVB6i2D0upWfRXBFXA 8 | NNnsg9/zjvoC7ZW73y9uSH+dPJTt/Vgfeiv52/v41XliyzbUyLalf02GNPY+9goV 9 | JHG1ulEEBJOCiUD9cE1PUIJwHA/HqyhHIvV350YoEFiHl8iSwm7SiZu5kPjaq74= 10 | =B6+8 11 | -----END PGP SIGNATURE----- 12 | -------------------------------------------------------------------------------- /vendor/paragonie/random_compat/lib/random.php: -------------------------------------------------------------------------------- 1 | buildFromDirectory(dirname(__DIR__).'/lib'); 19 | rename( 20 | dirname(__DIR__).'/lib/index.php', 21 | dirname(__DIR__).'/lib/random.php' 22 | ); 23 | 24 | /** 25 | * If we pass an (optional) path to a private key as a second argument, we will 26 | * sign the Phar with OpenSSL. 27 | * 28 | * If you leave this out, it will produce an unsigned .phar! 29 | */ 30 | if ($argc > 1) { 31 | if (!@is_readable($argv[1])) { 32 | echo 'Could not read the private key file:', $argv[1], "\n"; 33 | exit(255); 34 | } 35 | $pkeyFile = file_get_contents($argv[1]); 36 | 37 | $private = openssl_get_privatekey($pkeyFile); 38 | if ($private !== false) { 39 | $pkey = ''; 40 | openssl_pkey_export($private, $pkey); 41 | $phar->setSignatureAlgorithm(Phar::OPENSSL, $pkey); 42 | 43 | /** 44 | * Save the corresponding public key to the file 45 | */ 46 | if (!@is_readable($dist.'/random_compat.phar.pubkey')) { 47 | $details = openssl_pkey_get_details($private); 48 | file_put_contents( 49 | $dist.'/random_compat.phar.pubkey', 50 | $details['key'] 51 | ); 52 | } 53 | } else { 54 | echo 'An error occurred reading the private key from OpenSSL.', "\n"; 55 | exit(255); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /vendor/paragonie/random_compat/psalm-autoload.php: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /vendor/psr/clock/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file, in reverse chronological order by release. 4 | 5 | ## 1.0.0 6 | 7 | First stable release after PSR-20 acceptance 8 | 9 | ## 0.1.0 10 | 11 | First release 12 | -------------------------------------------------------------------------------- /vendor/psr/clock/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 PHP Framework Interoperability Group 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/psr/clock/README.md: -------------------------------------------------------------------------------- 1 | # PSR Clock 2 | 3 | This repository holds the interface for [PSR-20][psr-url]. 4 | 5 | Note that this is not a clock of its own. It is merely an interface that 6 | describes a clock. See the specification for more details. 7 | 8 | ## Installation 9 | 10 | ```bash 11 | composer require psr/clock 12 | ``` 13 | 14 | ## Usage 15 | 16 | If you need a clock, you can use the interface like this: 17 | 18 | ```php 19 | clock = $clock; 30 | } 31 | 32 | public function doSomething() 33 | { 34 | /** @var DateTimeImmutable $currentDateAndTime */ 35 | $currentDateAndTime = $this->clock->now(); 36 | // do something useful with that information 37 | } 38 | } 39 | ``` 40 | 41 | You can then pick one of the [implementations][implementation-url] of the interface to get a clock. 42 | 43 | If you want to implement the interface, you can require this package and 44 | implement `Psr\Clock\ClockInterface` in your code. 45 | 46 | Don't forget to add `psr/clock-implementation` to your `composer.json`s `provides`-section like this: 47 | 48 | ```json 49 | { 50 | "provides": { 51 | "psr/clock-implementation": "1.0" 52 | } 53 | } 54 | ``` 55 | 56 | And please read the [specification text][specification-url] for details on the interface. 57 | 58 | [psr-url]: https://www.php-fig.org/psr/psr-20 59 | [package-url]: https://packagist.org/packages/psr/clock 60 | [implementation-url]: https://packagist.org/providers/psr/clock-implementation 61 | [specification-url]: https://github.com/php-fig/fig-standards/blob/master/proposed/clock.md 62 | -------------------------------------------------------------------------------- /vendor/psr/clock/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "psr/clock", 3 | "description": "Common interface for reading the clock.", 4 | "keywords": ["psr", "psr-20", "time", "clock", "now"], 5 | "homepage": "https://github.com/php-fig/clock", 6 | "license": "MIT", 7 | "authors": [ 8 | { 9 | "name": "PHP-FIG", 10 | "homepage": "https://www.php-fig.org/" 11 | } 12 | ], 13 | "require": { 14 | "php": "^7.0 || ^8.0" 15 | }, 16 | "autoload": { 17 | "psr-4": { 18 | "Psr\\Clock\\": "src/" 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor/psr/clock/src/ClockInterface.php: -------------------------------------------------------------------------------- 1 | =7.1", 26 | "psr/http-message": "^1.0 || ^2.0" 27 | }, 28 | "autoload": { 29 | "psr-4": { 30 | "Psr\\Http\\Message\\": "src/" 31 | } 32 | }, 33 | "extra": { 34 | "branch-alias": { 35 | "dev-master": "1.0.x-dev" 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /vendor/psr/http-factory/src/RequestFactoryInterface.php: -------------------------------------------------------------------------------- 1 | = 5.3. 5 | 6 | [![Build Status](https://travis-ci.org/ralouphie/getallheaders.svg?branch=master)](https://travis-ci.org/ralouphie/getallheaders) 7 | [![Coverage Status](https://coveralls.io/repos/ralouphie/getallheaders/badge.png?branch=master)](https://coveralls.io/r/ralouphie/getallheaders?branch=master) 8 | [![Latest Stable Version](https://poser.pugx.org/ralouphie/getallheaders/v/stable.png)](https://packagist.org/packages/ralouphie/getallheaders) 9 | [![Latest Unstable Version](https://poser.pugx.org/ralouphie/getallheaders/v/unstable.png)](https://packagist.org/packages/ralouphie/getallheaders) 10 | [![License](https://poser.pugx.org/ralouphie/getallheaders/license.png)](https://packagist.org/packages/ralouphie/getallheaders) 11 | 12 | 13 | This is a simple polyfill for [`getallheaders()`](http://www.php.net/manual/en/function.getallheaders.php). 14 | 15 | ## Install 16 | 17 | For PHP version **`>= 5.6`**: 18 | 19 | ``` 20 | composer require ralouphie/getallheaders 21 | ``` 22 | 23 | For PHP version **`< 5.6`**: 24 | 25 | ``` 26 | composer require ralouphie/getallheaders "^2" 27 | ``` 28 | -------------------------------------------------------------------------------- /vendor/ralouphie/getallheaders/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ralouphie/getallheaders", 3 | "description": "A polyfill for getallheaders.", 4 | "license": "MIT", 5 | "authors": [ 6 | { 7 | "name": "Ralph Khattar", 8 | "email": "ralph.khattar@gmail.com" 9 | } 10 | ], 11 | "require": { 12 | "php": ">=5.6" 13 | }, 14 | "require-dev": { 15 | "phpunit/phpunit": "^5 || ^6.5", 16 | "php-coveralls/php-coveralls": "^2.1" 17 | }, 18 | "autoload": { 19 | "files": ["src/getallheaders.php"] 20 | }, 21 | "autoload-dev": { 22 | "psr-4": { 23 | "getallheaders\\Tests\\": "tests/" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/ralouphie/getallheaders/src/getallheaders.php: -------------------------------------------------------------------------------- 1 | 'Content-Type', 16 | 'CONTENT_LENGTH' => 'Content-Length', 17 | 'CONTENT_MD5' => 'Content-Md5', 18 | ); 19 | 20 | foreach ($_SERVER as $key => $value) { 21 | if (substr($key, 0, 5) === 'HTTP_') { 22 | $key = substr($key, 5); 23 | if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) { 24 | $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key)))); 25 | $headers[$key] = $value; 26 | } 27 | } elseif (isset($copy_server[$key])) { 28 | $headers[$copy_server[$key]] = $value; 29 | } 30 | } 31 | 32 | if (!isset($headers['Authorization'])) { 33 | if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) { 34 | $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION']; 35 | } elseif (isset($_SERVER['PHP_AUTH_USER'])) { 36 | $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : ''; 37 | $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass); 38 | } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) { 39 | $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST']; 40 | } 41 | } 42 | 43 | return $headers; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /vendor/robrichards/xmlseclibs/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2007-2019, Robert Richards . 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in 13 | the documentation and/or other materials provided with the 14 | distribution. 15 | 16 | * Neither the name of Robert Richards nor the names of his 17 | contributors may be used to endorse or promote products derived 18 | from this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24 | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /vendor/robrichards/xmlseclibs/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "robrichards/xmlseclibs", 3 | "description": "A PHP library for XML Security", 4 | "license": "BSD-3-Clause", 5 | "keywords": [ 6 | "xml", 7 | "xmldsig", 8 | "signature", 9 | "security" 10 | ], 11 | "homepage": "https://github.com/robrichards/xmlseclibs", 12 | "autoload": { 13 | "psr-4": { 14 | "RobRichards\\XMLSecLibs\\": "src" 15 | } 16 | }, 17 | "require": { 18 | "php": ">= 5.4", 19 | "ext-openssl": "*" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor/robrichards/xmlseclibs/src/Utils/XPath.php: -------------------------------------------------------------------------------- 1 | =8.1" 19 | }, 20 | "autoload": { 21 | "files": [ 22 | "function.php" 23 | ] 24 | }, 25 | "minimum-stability": "dev", 26 | "extra": { 27 | "branch-alias": { 28 | "dev-main": "3.5-dev" 29 | }, 30 | "thanks": { 31 | "name": "symfony/contracts", 32 | "url": "https://github.com/symfony/contracts" 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /vendor/symfony/deprecation-contracts/function.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | if (!function_exists('trigger_deprecation')) { 13 | /** 14 | * Triggers a silenced deprecation notice. 15 | * 16 | * @param string $package The name of the Composer package that is triggering the deprecation 17 | * @param string $version The version of the package that introduced the deprecation 18 | * @param string $message The message of the deprecation 19 | * @param mixed ...$args Values to insert in the message using printf() formatting 20 | * 21 | * @author Nicolas Grekas 22 | */ 23 | function trigger_deprecation(string $package, string $version, string $message, mixed ...$args): void 24 | { 25 | @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED); 26 | } 27 | } 28 | --------------------------------------------------------------------------------