Add Suite-8 user authentication

This commit is contained in:
Dillon-Brown 2020-02-03 07:18:15 +00:00
parent ca0e00dfd1
commit 9bff8530c6
25 changed files with 845 additions and 100 deletions

5
.gitignore vendored
View file

@ -154,3 +154,8 @@ testem.log
.c9/
*.launch
###> friendsofphp/php-cs-fixer ###
/.php_cs
/.php_cs.cache
###< friendsofphp/php-cs-fixer ###

14
.php_cs.dist Normal file
View file

@ -0,0 +1,14 @@
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('var')
;
return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
])
->setFinder($finder)
;

View file

@ -24,6 +24,7 @@
"symfony/dotenv": "^4.4",
"symfony/flex": "^1.6",
"symfony/framework-bundle": "^4.4",
"symfony/http-client": "^4.4",
"symfony/monolog-bundle": "^3.5",
"symfony/orm-pack": "^1.0",
"symfony/security-bundle": "^4.4",
@ -39,21 +40,24 @@
"doctrine/doctrine-fixtures-bundle": "~3.2",
"doctrine/doctrine-migrations-bundle": "^2.1",
"roave/security-advisories": "dev-master",
"symfony/maker-bundle": "^1.14"
"symfony/maker-bundle": "^1.14",
"symfony/profiler-pack": "^1.0"
},
"autoload": {
"psr-4": {
"App\\": "core/src/",
"SuiteCRM\\Core\\src\\": "core/src/",
"SuiteCRM\\Core\\Modules\\": "core/modules/",
"SuiteCRM\\Core\\Legacy\\": "core/legacy/",
"App\\": "core/src/",
"App\\Entity\\": "core/src/Entity/",
"App\\EventSubscriber\\": "core/src/EventSubscriber/",
"App\\Repository\\": "core/src/Repository",
"App\\Security\\": "core/src/Security",
"App\\Command\\": "core/src/Command/",
"App\\Controller\\": "core/src/Controller/",
"App\\DataFixtures\\": "core/src/DataFixtures/",
"App\\DataProvider\\": "core/src/DataProvider/",
"App\\Entity\\": "core/src/Entity/",
"App\\Services\\": "core/src/Service/",
"App\\EventListener\\": "core/src/EventListener/",
"App\\Controller\\": "core/src/Controller/"
"App\\EventListener\\": "core/src/EventListener/"
}
},
"scripts": {

416
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "8d9b6a45bf977ffbdd21d388600817d4",
"content-hash": "5c78241827f86623561294965316b243",
"packages": [
{
"name": "api-platform/api-pack",
@ -3166,6 +3166,131 @@
"homepage": "https://symfony.com",
"time": "2020-01-30T16:24:07+00:00"
},
{
"name": "symfony/http-client",
"version": "v4.4.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-client.git",
"reference": "250c5363e4d67f8e3c9cdf3362f134e040e69612"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-client/zipball/250c5363e4d67f8e3c9cdf3362f134e040e69612",
"reference": "250c5363e4d67f8e3c9cdf3362f134e040e69612",
"shasum": ""
},
"require": {
"php": "^7.1.3",
"psr/log": "^1.0",
"symfony/http-client-contracts": "^1.1.8|^2",
"symfony/polyfill-php73": "^1.11",
"symfony/service-contracts": "^1.0|^2"
},
"provide": {
"php-http/async-client-implementation": "*",
"php-http/client-implementation": "*",
"psr/http-client-implementation": "1.0",
"symfony/http-client-implementation": "1.1"
},
"require-dev": {
"guzzlehttp/promises": "^1.3.1",
"nyholm/psr7": "^1.0",
"php-http/httplug": "^1.0|^2.0",
"psr/http-client": "^1.0",
"symfony/dependency-injection": "^4.3|^5.0",
"symfony/http-kernel": "^4.4",
"symfony/process": "^4.2|^5.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.4-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\HttpClient\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony HttpClient component",
"homepage": "https://symfony.com",
"time": "2020-01-31T09:11:17+00:00"
},
{
"name": "symfony/http-client-contracts",
"version": "v1.1.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-client-contracts.git",
"reference": "088bae75cfa2ec5eb6d33dce17dbd8613150ce6e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/088bae75cfa2ec5eb6d33dce17dbd8613150ce6e",
"reference": "088bae75cfa2ec5eb6d33dce17dbd8613150ce6e",
"shasum": ""
},
"require": {
"php": "^7.1.3"
},
"suggest": {
"symfony/http-client-implementation": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Contracts\\HttpClient\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Generic abstractions related to HTTP clients",
"homepage": "https://symfony.com",
"keywords": [
"abstractions",
"contracts",
"decoupling",
"interfaces",
"interoperability",
"standards"
],
"time": "2019-11-07T12:44:51+00:00"
},
{
"name": "symfony/http-foundation",
"version": "v4.4.4",
@ -3563,23 +3688,22 @@
},
{
"name": "symfony/orm-pack",
"version": "v1.0.7",
"version": "v1.0.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/orm-pack.git",
"reference": "c57f5e05232ca40626eb9fa52a32bc8565e9231c"
"reference": "c9bcc08102061f406dc908192c0f33524a675666"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/orm-pack/zipball/c57f5e05232ca40626eb9fa52a32bc8565e9231c",
"reference": "c57f5e05232ca40626eb9fa52a32bc8565e9231c",
"url": "https://api.github.com/repos/symfony/orm-pack/zipball/c9bcc08102061f406dc908192c0f33524a675666",
"reference": "c9bcc08102061f406dc908192c0f33524a675666",
"shasum": ""
},
"require": {
"doctrine/doctrine-bundle": "^1.6.10|^2.0",
"doctrine/doctrine-migrations-bundle": "^1.3|^2.0",
"doctrine/orm": "^2.5.11",
"php": "^7.0"
"doctrine/doctrine-bundle": "*",
"doctrine/doctrine-migrations-bundle": "*",
"doctrine/orm": "*"
},
"type": "symfony-pack",
"notification-url": "https://packagist.org/downloads/",
@ -3587,20 +3711,20 @@
"MIT"
],
"description": "A pack for the Doctrine ORM",
"time": "2019-10-18T05:41:09+00:00"
"time": "2020-02-10T18:03:48+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.13.1",
"version": "v1.14.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3"
"reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3",
"reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38",
"reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38",
"shasum": ""
},
"require": {
@ -3612,7 +3736,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.13-dev"
"dev-master": "1.14-dev"
}
},
"autoload": {
@ -3645,26 +3769,26 @@
"polyfill",
"portable"
],
"time": "2019-11-27T13:56:44+00:00"
"time": "2020-01-13T11:15:53+00:00"
},
{
"name": "symfony/polyfill-intl-idn",
"version": "v1.13.1",
"version": "v1.14.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-idn.git",
"reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46"
"reference": "6842f1a39cf7d580655688069a03dd7cd83d244a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6f9c239e61e1b0c9229a28ff89a812dc449c3d46",
"reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6842f1a39cf7d580655688069a03dd7cd83d244a",
"reference": "6842f1a39cf7d580655688069a03dd7cd83d244a",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/polyfill-mbstring": "^1.3",
"symfony/polyfill-php72": "^1.9"
"symfony/polyfill-php72": "^1.10"
},
"suggest": {
"ext-intl": "For best performance"
@ -3672,7 +3796,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.13-dev"
"dev-master": "1.14-dev"
}
},
"autoload": {
@ -3707,20 +3831,20 @@
"portable",
"shim"
],
"time": "2019-11-27T13:56:44+00:00"
"time": "2020-01-17T12:01:36+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.13.1",
"version": "v1.14.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "7b4aab9743c30be783b73de055d24a39cf4b954f"
"reference": "34094cfa9abe1f0f14f48f490772db7a775559f2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f",
"reference": "7b4aab9743c30be783b73de055d24a39cf4b954f",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2",
"reference": "34094cfa9abe1f0f14f48f490772db7a775559f2",
"shasum": ""
},
"require": {
@ -3732,7 +3856,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.13-dev"
"dev-master": "1.14-dev"
}
},
"autoload": {
@ -3766,20 +3890,20 @@
"portable",
"shim"
],
"time": "2019-11-27T14:18:11+00:00"
"time": "2020-01-13T11:15:53+00:00"
},
{
"name": "symfony/polyfill-php72",
"version": "v1.13.1",
"version": "v1.14.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "66fea50f6cb37a35eea048d75a7d99a45b586038"
"reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/66fea50f6cb37a35eea048d75a7d99a45b586038",
"reference": "66fea50f6cb37a35eea048d75a7d99a45b586038",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf",
"reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf",
"shasum": ""
},
"require": {
@ -3788,7 +3912,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.13-dev"
"dev-master": "1.14-dev"
}
},
"autoload": {
@ -3821,20 +3945,20 @@
"portable",
"shim"
],
"time": "2019-11-27T13:56:44+00:00"
"time": "2020-01-13T11:15:53+00:00"
},
{
"name": "symfony/polyfill-php73",
"version": "v1.13.1",
"version": "v1.14.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
"reference": "4b0e2222c55a25b4541305a053013d5647d3a25f"
"reference": "5e66a0fa1070bf46bec4bea7962d285108edd675"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/4b0e2222c55a25b4541305a053013d5647d3a25f",
"reference": "4b0e2222c55a25b4541305a053013d5647d3a25f",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/5e66a0fa1070bf46bec4bea7962d285108edd675",
"reference": "5e66a0fa1070bf46bec4bea7962d285108edd675",
"shasum": ""
},
"require": {
@ -3843,7 +3967,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.13-dev"
"dev-master": "1.14-dev"
}
},
"autoload": {
@ -3879,7 +4003,7 @@
"portable",
"shim"
],
"time": "2019-11-27T16:25:15+00:00"
"time": "2020-01-13T11:15:53+00:00"
},
{
"name": "symfony/property-access",
@ -5165,16 +5289,16 @@
},
{
"name": "twig/twig",
"version": "v2.12.3",
"version": "v2.12.5",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "97b6311585cae66a26833b14b33785f5797f7d39"
"reference": "18772e0190734944277ee97a02a9a6c6555fcd94"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/97b6311585cae66a26833b14b33785f5797f7d39",
"reference": "97b6311585cae66a26833b14b33785f5797f7d39",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/18772e0190734944277ee97a02a9a6c6555fcd94",
"reference": "18772e0190734944277ee97a02a9a6c6555fcd94",
"shasum": ""
},
"require": {
@ -5226,7 +5350,7 @@
"keywords": [
"templating"
],
"time": "2019-12-28T07:12:03+00:00"
"time": "2020-02-11T15:31:23+00:00"
},
{
"name": "webmozart/assert",
@ -5625,22 +5749,22 @@
},
{
"name": "codeception/codeception",
"version": "4.0.3",
"version": "4.1.0",
"source": {
"type": "git",
"url": "https://github.com/Codeception/Codeception.git",
"reference": "ffc951ed077eb48203e033675d32e9b8dcd80fc7"
"reference": "cbf03428bbc26dbe455169aec1ac138f53191a54"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Codeception/Codeception/zipball/ffc951ed077eb48203e033675d32e9b8dcd80fc7",
"reference": "ffc951ed077eb48203e033675d32e9b8dcd80fc7",
"url": "https://api.github.com/repos/Codeception/Codeception/zipball/cbf03428bbc26dbe455169aec1ac138f53191a54",
"reference": "cbf03428bbc26dbe455169aec1ac138f53191a54",
"shasum": ""
},
"require": {
"behat/gherkin": "^4.4.0",
"codeception/lib-asserts": "^1.0",
"codeception/phpunit-wrapper": ">6.0.15 <6.1.0 | ^6.6.1 | ^7.7.1 | ^8.1.1",
"codeception/phpunit-wrapper": ">6.0.15 <6.1.0 | ^6.6.1 | ^7.7.1 | ^8.1.1 | ^9.0",
"codeception/stub": "^2.0 | ^3.0",
"ext-curl": "*",
"ext-json": "*",
@ -5706,25 +5830,25 @@
"functional testing",
"unit testing"
],
"time": "2020-01-24T07:23:42+00:00"
"time": "2020-02-07T20:33:23+00:00"
},
{
"name": "codeception/lib-asserts",
"version": "1.10.1",
"version": "1.11.0",
"source": {
"type": "git",
"url": "https://github.com/Codeception/lib-asserts.git",
"reference": "f052dfebad3e9bcafc66c22a7ef39cb1a30cebd2"
"reference": "1fdc310bf857c11d3703ae02689a2e482c71c5ab"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Codeception/lib-asserts/zipball/f052dfebad3e9bcafc66c22a7ef39cb1a30cebd2",
"reference": "f052dfebad3e9bcafc66c22a7ef39cb1a30cebd2",
"url": "https://api.github.com/repos/Codeception/lib-asserts/zipball/1fdc310bf857c11d3703ae02689a2e482c71c5ab",
"reference": "1fdc310bf857c11d3703ae02689a2e482c71c5ab",
"shasum": ""
},
"require": {
"php": ">=7.2.0 <8.0",
"phpunit/phpunit": "^8.4"
"phpunit/phpunit": "^8.4 | ^9.0"
},
"type": "library",
"autoload": {
@ -5751,7 +5875,7 @@
"keywords": [
"codeception"
],
"time": "2019-11-23T20:16:40+00:00"
"time": "2020-02-11T10:45:21+00:00"
},
{
"name": "codeception/lib-innerbrowser",
@ -6009,20 +6133,20 @@
},
{
"name": "codeception/stub",
"version": "3.6.0",
"version": "3.6.1",
"source": {
"type": "git",
"url": "https://github.com/Codeception/Stub.git",
"reference": "94874f511ab1025b1f4cb927884cdda5004ece64"
"reference": "a3ba01414cbee76a1bced9f9b6b169cc8d203880"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Codeception/Stub/zipball/94874f511ab1025b1f4cb927884cdda5004ece64",
"reference": "94874f511ab1025b1f4cb927884cdda5004ece64",
"url": "https://api.github.com/repos/Codeception/Stub/zipball/a3ba01414cbee76a1bced9f9b6b169cc8d203880",
"reference": "a3ba01414cbee76a1bced9f9b6b169cc8d203880",
"shasum": ""
},
"require": {
"phpunit/phpunit": "^8.4"
"phpunit/phpunit": "^8.4 | ^9.0"
},
"type": "library",
"autoload": {
@ -6035,7 +6159,7 @@
"MIT"
],
"description": "Flexible Stub wrapper for PHPUnit's Mock Builder",
"time": "2019-11-23T20:11:30+00:00"
"time": "2020-02-07T18:42:28+00:00"
},
{
"name": "composer/semver",
@ -7528,12 +7652,12 @@
"source": {
"type": "git",
"url": "https://github.com/Roave/SecurityAdvisories.git",
"reference": "666ba252853924887ac57dc9f66e6b6af78d5a76"
"reference": "0365bf26eddd4a8be9980d7dabf05ceb2aba2f02"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/666ba252853924887ac57dc9f66e6b6af78d5a76",
"reference": "666ba252853924887ac57dc9f66e6b6af78d5a76",
"url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/0365bf26eddd4a8be9980d7dabf05ceb2aba2f02",
"reference": "0365bf26eddd4a8be9980d7dabf05ceb2aba2f02",
"shasum": ""
},
"conflict": {
@ -7545,11 +7669,14 @@
"api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6",
"asymmetricrypt/asymmetricrypt": ">=0,<9.9.99",
"aws/aws-sdk-php": ">=3,<3.2.1",
"bagisto/bagisto": "<0.1.5",
"bolt/bolt": "<3.6.10",
"brightlocal/phpwhois": "<=4.2.5",
"bugsnag/bugsnag-laravel": ">=2,<2.0.2",
"cakephp/cakephp": ">=1.3,<1.3.18|>=2,<2.4.99|>=2.5,<2.5.99|>=2.6,<2.6.12|>=2.7,<2.7.6|>=3,<3.5.18|>=3.6,<3.6.15|>=3.7,<3.7.7",
"cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4",
"cartalyst/sentry": "<=2.1.6",
"cesnet/simplesamlphp-module-proxystatistics": "<3.1",
"codeigniter/framework": "<=3.0.6",
"composer/composer": "<=1-alpha.11",
"contao-components/mediaelement": ">=2.14.2,<2.21.1",
@ -7567,12 +7694,18 @@
"doctrine/mongodb-odm": ">=1,<1.0.2",
"doctrine/mongodb-odm-bundle": ">=2,<3.0.1",
"doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1",
"dolibarr/dolibarr": "<=10.0.6",
"dompdf/dompdf": ">=0.6,<0.6.2",
"drupal/core": ">=7,<7.69|>=8,<8.7.11|>=8.8,<8.8.1",
"drupal/drupal": ">=7,<7.69|>=8,<8.7.11|>=8.8,<8.8.1",
"endroid/qr-code-bundle": "<3.4.2",
"enshrined/svg-sanitize": "<0.12",
"erusev/parsedown": "<1.7.2",
"ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.4",
"ezsystems/ezfind-ls": ">=5.3,<5.3.6.1|>=5.4,<5.4.11.1|>=2017.12,<2017.12.0.1",
"ezsystems/ezplatform": ">=1.7,<1.7.9.1|>=1.13,<1.13.5.1|>=2.5,<2.5.4",
"ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6",
"ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2",
"ezsystems/ezplatform-user": ">=1,<1.0.1",
"ezsystems/ezpublish-kernel": ">=5.3,<5.3.12.1|>=5.4,<5.4.13.1|>=6,<6.7.9.1|>=6.8,<6.13.5.1|>=7,<7.2.4.1|>=7.3,<7.3.2.1",
"ezsystems/ezpublish-legacy": ">=5.3,<5.3.12.6|>=5.4,<5.4.12.3|>=2011,<2017.12.4.3|>=2018.6,<2018.6.1.4|>=2018.9,<2018.9.1.3",
"ezsystems/repository-forms": ">=2.3,<2.3.2.1",
@ -7583,6 +7716,7 @@
"friendsofsymfony/rest-bundle": ">=1.2,<1.2.2",
"friendsofsymfony/user-bundle": ">=1.2,<1.3.5",
"fuel/core": "<1.8.1",
"getgrav/grav": "<1.7-beta.8",
"gree/jose": "<=2.2",
"gregwar/rst": "<1.0.3",
"guzzlehttp/guzzle": ">=4-rc.2,<4.2.4|>=5,<5.3.1|>=6,<6.2.1",
@ -7600,12 +7734,15 @@
"laravel/framework": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.42|>=5.6,<5.6.30",
"laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10",
"league/commonmark": "<0.18.3",
"librenms/librenms": "<1.53",
"magento/community-edition": ">=2,<2.2.10|>=2.3,<2.3.3",
"magento/magento1ce": "<1.9.4.3",
"magento/magento1ee": ">=1,<1.14.4.3",
"magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.2-p.2",
"monolog/monolog": ">=1.8,<1.12",
"namshi/jose": "<2.2",
"onelogin/php-saml": "<2.10.4",
"oneup/uploader-bundle": ">=1,<1.9.3|>=2,<2.1.5",
"openid/php-openid": "<2.3",
"oro/crm": ">=1.7,<1.7.4",
"oro/platform": ">=1.7,<1.7.4",
@ -7614,32 +7751,45 @@
"paragonie/random_compat": "<2",
"paypal/merchant-sdk-php": "<3.12",
"pear/archive_tar": "<1.4.4",
"phpfastcache/phpfastcache": ">=5,<5.0.13",
"phpmailer/phpmailer": ">=5,<5.2.27|>=6,<6.0.6",
"phpoffice/phpexcel": "<=1.8.1",
"phpoffice/phpspreadsheet": "<=1.5",
"phpmyadmin/phpmyadmin": "<4.9.2",
"phpoffice/phpexcel": "<1.8.2",
"phpoffice/phpspreadsheet": "<1.8",
"phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3",
"phpwhois/phpwhois": "<=4.2.5",
"phpxmlrpc/extras": "<0.6.1",
"pimcore/pimcore": "<6.3",
"prestashop/autoupgrade": ">=4,<4.10.1",
"prestashop/gamification": "<2.3.2",
"prestashop/ps_facetedsearch": "<3.4.1",
"privatebin/privatebin": "<1.2.2|>=1.3,<1.3.2",
"propel/propel": ">=2-alpha.1,<=2-alpha.7",
"propel/propel1": ">=1,<=1.7.1",
"pusher/pusher-php-server": "<2.2.1",
"robrichards/xmlseclibs": ">=1,<3.0.4",
"robrichards/xmlseclibs": "<3.0.4",
"sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9",
"scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11",
"sensiolabs/connect": "<4.2.3",
"serluck/phpwhois": "<=4.2.6",
"shopware/shopware": "<5.3.7",
"silverstripe/cms": ">=3,<=3.0.11|>=3.1,<3.1.11",
"silverstripe/admin": ">=1.0.3,<1.0.4|>=1.1,<1.1.1",
"silverstripe/assets": ">=1,<1.3.5",
"silverstripe/cms": "<4.3.6|>=4.4,<4.4.4",
"silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1",
"silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3",
"silverstripe/framework": ">=3,<3.6.7|>=3.7,<3.7.3|>=4,<4.4",
"silverstripe/framework": "<4.4.4",
"silverstripe/graphql": ">=2,<2.0.5|>=3,<3.1.2",
"silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1",
"silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4",
"silverstripe/subsites": ">=2,<2.1.1",
"silverstripe/taxonomy": ">=1.3,<1.3.1|>=2,<2.0.1",
"silverstripe/userforms": "<3",
"simple-updates/phpwhois": "<=1",
"simplesamlphp/saml2": "<1.10.6|>=2,<2.3.8|>=3,<3.1.4",
"simplesamlphp/simplesamlphp": "<1.17.8",
"simplesamlphp/simplesamlphp": "<1.18.4",
"simplesamlphp/simplesamlphp-module-infocard": "<1.0.1",
"simplito/elliptic-php": "<1.0.6",
"slim/slim": "<2.6",
"smarty/smarty": "<3.1.33",
"socalnick/scn-social-auth": "<1.15.2",
@ -7651,8 +7801,10 @@
"sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2",
"sylius/grid": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1",
"sylius/grid-bundle": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1",
"sylius/resource-bundle": ">=1,<1.3.13|>=1.4,<1.4.6|>=1.5,<1.5.1|>=1.6,<1.6.3",
"sylius/sylius": ">=1,<1.3.12|>=1.4,<1.4.4",
"sylius/resource-bundle": "<1.3.13|>=1.4,<1.4.6|>=1.5,<1.5.1|>=1.6,<1.6.3",
"sylius/sylius": "<1.3.16|>=1.4,<1.4.12|>=1.5,<1.5.9|>=1.6,<1.6.5",
"symbiote/silverstripe-multivaluefield": ">=3,<3.0.99",
"symbiote/silverstripe-versionedfiles": "<=2.0.3",
"symfony/cache": ">=3.1,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8",
"symfony/dependency-injection": ">=2,<2.0.17|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7",
"symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1",
@ -7692,8 +7844,11 @@
"typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4",
"typo3/phar-stream-wrapper": ">=1,<2.1.1|>=3,<3.1.1",
"ua-parser/uap-php": "<3.8",
"usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2",
"verot/class.upload.php": "<1.0.3|>=2,<2.0.4",
"wallabag/tcpdf": "<6.2.22",
"willdurand/js-translation-bundle": "<2.1.1",
"yii2mod/yii2-cms": "<1.9.2",
"yiisoft/yii": ">=1.1.14,<1.1.15",
"yiisoft/yii2": "<2.0.15",
"yiisoft/yii2-bootstrap": "<2.0.4",
@ -7702,6 +7857,7 @@
"yiisoft/yii2-gii": "<2.0.4",
"yiisoft/yii2-jui": "<2.0.4",
"yiisoft/yii2-redis": "<2.0.8",
"yourls/yourls": "<1.7.4",
"zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3",
"zendframework/zend-captcha": ">=2,<2.4.9|>=2.5,<2.5.2",
"zendframework/zend-crypt": ">=2,<2.4.9|>=2.5,<2.5.2",
@ -7746,7 +7902,7 @@
}
],
"description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it",
"time": "2020-01-28T17:25:41+00:00"
"time": "2020-02-10T16:13:40+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
@ -8660,16 +8816,16 @@
},
{
"name": "symfony/polyfill-php70",
"version": "v1.13.1",
"version": "v1.14.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php70.git",
"reference": "af23c7bb26a73b850840823662dda371484926c4"
"reference": "419c4940024c30ccc033650373a1fe13890d3255"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/af23c7bb26a73b850840823662dda371484926c4",
"reference": "af23c7bb26a73b850840823662dda371484926c4",
"url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/419c4940024c30ccc033650373a1fe13890d3255",
"reference": "419c4940024c30ccc033650373a1fe13890d3255",
"shasum": ""
},
"require": {
@ -8679,7 +8835,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.13-dev"
"dev-master": "1.14-dev"
}
},
"autoload": {
@ -8715,7 +8871,7 @@
"portable",
"shim"
],
"time": "2019-11-27T13:56:44+00:00"
"time": "2020-01-13T11:15:53+00:00"
},
{
"name": "symfony/process",
@ -8766,6 +8922,100 @@
"homepage": "https://symfony.com",
"time": "2020-01-09T09:50:08+00:00"
},
{
"name": "symfony/profiler-pack",
"version": "v1.0.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/profiler-pack.git",
"reference": "99c4370632c2a59bb0444852f92140074ef02209"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/profiler-pack/zipball/99c4370632c2a59bb0444852f92140074ef02209",
"reference": "99c4370632c2a59bb0444852f92140074ef02209",
"shasum": ""
},
"require": {
"php": "^7.0",
"symfony/stopwatch": "*",
"symfony/twig-bundle": "*",
"symfony/web-profiler-bundle": "*"
},
"type": "symfony-pack",
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "A pack for the Symfony web profiler",
"time": "2018-12-10T12:11:44+00:00"
},
{
"name": "symfony/web-profiler-bundle",
"version": "v4.4.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/web-profiler-bundle.git",
"reference": "59822e61467f910a877e9ce432b461034f843cfa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/web-profiler-bundle/zipball/59822e61467f910a877e9ce432b461034f843cfa",
"reference": "59822e61467f910a877e9ce432b461034f843cfa",
"shasum": ""
},
"require": {
"php": "^7.1.3",
"symfony/config": "^4.2|^5.0",
"symfony/framework-bundle": "^4.4|^5.0",
"symfony/http-kernel": "^4.4",
"symfony/routing": "^4.3|^5.0",
"symfony/twig-bundle": "^4.2|^5.0",
"twig/twig": "^1.41|^2.10|^3.0"
},
"conflict": {
"symfony/form": "<4.3",
"symfony/messenger": "<4.2"
},
"require-dev": {
"symfony/browser-kit": "^4.3|^5.0",
"symfony/console": "^4.3|^5.0",
"symfony/css-selector": "^3.4|^4.0|^5.0",
"symfony/dependency-injection": "^3.4|^4.0|^5.0",
"symfony/stopwatch": "^3.4|^4.0|^5.0"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "4.4-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Bundle\\WebProfilerBundle\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony WebProfilerBundle",
"homepage": "https://symfony.com",
"time": "2020-01-21T16:34:10+00:00"
},
{
"name": "symfony/yaml",
"version": "v4.4.4",

View file

@ -12,4 +12,5 @@ return [
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
];

View file

@ -0,0 +1,6 @@
web_profiler:
toolbar: true
intercept_redirects: false
framework:
profiler: { only_exceptions: false }

View file

@ -13,6 +13,6 @@ doctrine:
App:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/core/modules'
prefix: 'SuiteCRM\Core\Modules\'
dir: '%kernel.project_dir%/core/src'
prefix: 'App\Entity\'
alias: App

View file

@ -1,10 +1,31 @@
security:
encoders:
App\Entity\User:
algorithm: auto
providers:
in_memory: { memory: null }
app_user_provider:
entity:
class: App\Entity\User
property: username
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
anonymous: lazy
guard:
authenticators:
- App\Security\LoginFormAuthenticator
form_login:
login_path: app_login
check_path: app_login
logout:
path: app_logout
# Note: Only the *first* access control that matches will be used
access_control:
- { path: ^/login$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/, roles: IS_AUTHENTICATED_FULLY }

View file

@ -0,0 +1,6 @@
web_profiler:
toolbar: false
intercept_redirects: false
framework:
profiler: { collect: false }

View file

@ -0,0 +1,7 @@
web_profiler_wdt:
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
prefix: /_wdt
web_profiler_profiler:
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
prefix: /_profiler

View file

@ -23,8 +23,8 @@ services:
# controllers are imported separately to make sure services can be injected
# as action arguments even if you don't extend any base controller class
SuiteCRM\Core\Modules\:
resource: '../core/modules/'
App\Controller\:
resource: '../core/src/Controller/*'
tags: ['controller.service_arguments']
# add more service definitions when explicit configuration is needed

View file

@ -34,7 +34,7 @@ export class AuthService {
onSuccess: (caller: LoginUiComponent, loginResponse: LoginResponseModel) => void,
onError: (caller: LoginUiComponent, error: HttpErrorResponse) => void
) {
const loginUrl = 'index.php?module=users&controller=oauth&action=login';
const loginUrl = 'login';
const body = new HttpParams()
.set('username', username)
@ -78,7 +78,7 @@ export class AuthService {
return;
}
const logoutUrl = 'index.php?module=users&controller=oauth&action=logout';
const logoutUrl = 'logout';
const body = new HttpParams()
.set('access_token', loginResponse.access_token)

View file

@ -267,4 +267,4 @@ button.settings-button.dropdown-toggle::after {
font-weight: bold;
color: $white;
background-color: $burnt-red;
}
}

View file

View file

@ -2,13 +2,14 @@
namespace App\Controller;
use RuntimeException;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class IndexController extends AbstractController
{
const INDEX_HTML_PATH = '/public/index.html';
public const INDEX_HTML_PATH = '/public/index.html';
/**
* @var string
@ -27,11 +28,11 @@ class IndexController extends AbstractController
/**
* @Route("/", name="index")
*/
public function index()
public function index(): Response
{
$indexHtmlPath = $this->projectDir . self::INDEX_HTML_PATH;
if (!file_exists($indexHtmlPath)){
if (!file_exists($indexHtmlPath)) {
throw new RuntimeException('Please run ng build from terminal');
}

View file

@ -0,0 +1,42 @@
<?php
namespace App\Controller;
use Exception;
use RuntimeException;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
/**
* Class SecurityController
* @package App\Controller
*/
class SecurityController extends AbstractController
{
/**
* @Route("/login", name="app_login")
* @param AuthenticationUtils $authenticationUtils
* @return Response
*/
public function login(AuthenticationUtils $authenticationUtils): Response
{
$error = $authenticationUtils->getLastAuthenticationError();
if ($error) {
return new Response('Login Failed', Response::HTTP_UNAUTHORIZED);
}
return new Response('Login Success', Response::HTTP_OK);
}
/**
* @Route("/logout", name="app_logout")
* @throws Exception
*/
public function logout(): void
{
throw new RuntimeException('This will be intercepted by the logout key');
}
}

View file

@ -0,0 +1,35 @@
<?php
namespace App\DataFixtures;
use App\Entity\User;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Persistence\ObjectManager;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
/**
* Class UserFixtures
* @package App\DataFixtures
*/
class UserFixtures extends Fixture
{
private $passwordEncoder;
public function __construct(UserPasswordEncoderInterface $passwordEncoder)
{
$this->passwordEncoder = $passwordEncoder;
}
/**
* @param ObjectManager $manager
*/
public function load(ObjectManager $manager): void
{
$user = new User();
$user->setPassword($this->passwordEncoder->encodePassword(
$user,
'the_new_password'
));
}
}

105
core/src/Entity/User.php Normal file
View file

@ -0,0 +1,105 @@
<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\UserInterface;
/**
* @ORM\Entity(repositoryClass="App\Repository\UserRepository")
* @ORM\Table(name="suite8_users")
*/
class User implements UserInterface
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=180, unique=true)
*/
private $username;
/**
* @ORM\Column(type="json")
*/
private $roles = [];
/**
* @var string The hashed password
* @ORM\Column(type="string")
*/
private $password;
public function getId(): ?int
{
return $this->id;
}
/**
* A visual identifier that represents this user.
*
* @see UserInterface
*/
public function getUsername(): string
{
return (string)$this->username;
}
public function setUsername(string $username): self
{
$this->username = $username;
return $this;
}
/**
* @see UserInterface
*/
public function getRoles(): array
{
$roles = $this->roles;
$roles[] = 'ROLE_USER';
return array_unique($roles);
}
public function setRoles(array $roles): self
{
$this->roles = $roles;
return $this;
}
/**
* @see UserInterface
*/
public function getPassword(): string
{
return $this->password;
}
public function setPassword(string $password): self
{
$this->password = $password;
return $this;
}
/**
* @see UserInterface
*/
public function getSalt()
{
}
/**
* @see UserInterface
*/
public function eraseCredentials(): void
{
}
}

View file

@ -0,0 +1,42 @@
<?php
namespace App\EventSubscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\Security\Http\Util\TargetPathTrait;
class RequestSubscriber implements EventSubscriberInterface
{
use TargetPathTrait;
private $session;
public function __construct(SessionInterface $session)
{
$this->session = $session;
}
public function onKernelRequest(RequestEvent $event): void
{
$request = $event->getRequest();
if (!$event->isMasterRequest() || $request->isXmlHttpRequest()) {
return;
}
$this->saveTargetPath($this->session, 'main', $request->getUri());
}
/**
* @return array
*/
public static function getSubscribedEvents()
{
return [
KernelEvents::REQUEST => ['onKernelRequest']
];
}
}

View file

View file

@ -0,0 +1,21 @@
<?php
namespace App\Repository;
use App\Entity\User;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Common\Persistence\ManagerRegistry;
/**
* @method User|null find($id, $lockMode = null, $lockVersion = null)
* @method User|null findOneBy(array $criteria, array $orderBy = null)
* @method User[] findAll()
* @method User[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class UserRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, User::class);
}
}

View file

@ -0,0 +1,136 @@
<?php
namespace App\Security;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
use Symfony\Component\Security\Core\Exception\CustomUserMessageAuthenticationException;
use Symfony\Component\Security\Core\Exception\InvalidCsrfTokenException;
use Symfony\Component\Security\Core\Security;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\User\UserProviderInterface;
use Symfony\Component\Security\Csrf\CsrfToken;
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
use Symfony\Component\Security\Guard\Authenticator\AbstractFormLoginAuthenticator;
use Symfony\Component\Security\Guard\PasswordAuthenticatedInterface;
use Symfony\Component\Security\Http\Util\TargetPathTrait;
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator implements PasswordAuthenticatedInterface
{
use TargetPathTrait;
private $entityManager;
private $router;
private $csrfTokenManager;
private $passwordEncoder;
public function __construct(
EntityManagerInterface $entityManager,
RouterInterface $router,
CsrfTokenManagerInterface $csrfTokenManager,
UserPasswordEncoderInterface $passwordEncoder
) {
$this->entityManager = $entityManager;
$this->router = $router;
$this->csrfTokenManager = $csrfTokenManager;
$this->passwordEncoder = $passwordEncoder;
}
/**
* @param Request $request
* @return bool
*/
public function supports(Request $request): bool
{
return 'app_login' === $request->attributes->get('_route')
&& $request->isMethod('POST');
}
/**
* @param Request $request
* @return array|mixed
*/
public function getCredentials(Request $request)
{
$credentials = [
'username' => $request->request->get('username'),
'password' => $request->request->get('password'),
'csrf_token' => $request->request->get('_csrf_token'),
];
$request->getSession()->set(
Security::LAST_USERNAME,
$credentials['username']
);
return $credentials;
}
/**
* @param mixed $credentials
* @param UserProviderInterface $userProvider
* @return UserInterface|null
*/
public function getUser($credentials, UserProviderInterface $userProvider): ?UserInterface
{
$token = new CsrfToken('authenticate', $credentials['csrf_token']);
if (!$this->csrfTokenManager->isTokenValid($token)) {
throw new InvalidCsrfTokenException();
}
$user = $userProvider->loadUserByUsername($credentials['username']);
if (!$user) {
throw new CustomUserMessageAuthenticationException('Username could not be found.');
}
return $user;
}
/**
* @param mixed $credentials
* @param UserInterface $user
* @return bool
*/
public function checkCredentials($credentials, UserInterface $user): bool
{
return true;
}
/**
* @param $credentials
* @return string|null
*/
public function getPassword($credentials): ?string
{
return $credentials['password'];
}
/**
* @param Request $request
* @param TokenInterface $token
* @param string $providerKey
* @return RedirectResponse|Response|null
*/
public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey)
{
if ($targetPath = $this->getTargetPath($request->getSession(), $providerKey)) {
return new RedirectResponse($targetPath);
}
return new RedirectResponse($this->router->generate('index'));
}
/**
* @return string
*/
protected function getLoginUrl(): string
{
return $this->router->generate('app_login');
}
}

View file

@ -182,6 +182,18 @@
"fig/link-util": {
"version": "1.1.0"
},
"friendsofphp/php-cs-fixer": {
"version": "2.2",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "2.2",
"ref": "cc05ab6abf6894bddb9bbd6a252459010ebe040b"
},
"files": [
".php_cs.dist"
]
},
"guzzlehttp/guzzle": {
"version": "6.5.2"
},
@ -426,6 +438,12 @@
"core/src/Kernel.php"
]
},
"symfony/http-client": {
"version": "v4.4.4"
},
"symfony/http-client-contracts": {
"version": "v1.1.8"
},
"symfony/http-foundation": {
"version": "v4.4.4"
},
@ -586,6 +604,20 @@
"symfony/web-link": {
"version": "v4.4.4"
},
"symfony/web-profiler-bundle": {
"version": "3.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.3",
"ref": "6bdfa1a95f6b2e677ab985cd1af2eae35d62e0f6"
},
"files": [
"config/packages/dev/web_profiler.yaml",
"config/packages/test/web_profiler.yaml",
"config/routes/dev/web_profiler.yaml"
]
},
"symfony/yaml": {
"version": "v4.4.4"
},

View file

View file

@ -0,0 +1,17 @@
<?php
namespace App\Tests;
use App\Tests\FunctionalTester;
class LoginCest
{
public function tryLogin(FunctionalTester $I)
{
$I->amOnPage('/#/Login');
$I->fillField('username', 'admin');
$I->fillField('password', 'admin');
$I->click('Login');
}
}