Posts by LRMiloef


    i have a question about pagekit authentication system. I want to create an API that's secured by @Access Annotations.

    At the moment i use this API for my pagekit-extension.

    Now i'd like to try to use the same API Endpoints from an third-party-application. So i need some authentication. I'd like to work with an API-Token, that can be generated for each user.

    This token can be set in the header or query of the requests. How can i do something like that?

    I think that can be useful for many other developers, too.

    Listening to the PreAuth-Event is no problem.

    But the question is how to break the currently running authentication process, search for username by E-Mail-Address and finally continue authentication with this new credentials?

    BTW: That's also the point where i stuck on creating 2FA-Extension. There i also have to hook into the preAuth-Event, check if there is 2FA enabled for the user who wants to log in, redirect to the 2FA-Input Page and finally continue the authentication process.

    Maybe you can help me with that.


    i need to install the dev-master Version of an composer package.

    When i add this to composer.json

    1. {
    2. "require": {
    3. "paypal/rest-api-sdk-php": "*"
    4. }
    5. }

    it will install the newest version (1.13.0).

    But when i replace it with this:

    1. {
    2. "require": {
    3. "paypal/rest-api-sdk-php": "dev-master"
    4. }
    5. }

    nothing will be installed. :(

    How can i install this needed version? Any ideas?

    Ok, i figured out, that i can set a cookie by plain javascript and i can read them like that:

    1. /** @var Request $request */
    2. $request = App::request();
    3. $cookies = $request->cookies->all();

    Is there an more elegant way? What is the CookieJar, that's included in Pagekit?


    i need to store something into a cookie. I found a method in the module cookie for that.

    App::cookie()->set('myCookieName', 'myData');

    But when i called this and take a look in the Chrome Dev-Tools, no cookie was stored. How can to do that?


    i know that this is maybe not a typicaly question for this forum, but maybe someone can help me out to find a solution for my problem:

    Let's say we have following table:

    ID requiredStaff(int) start(dateTime) end (dateTime)
    1 1 2018-05-18 10:00:00 2018-05-18 12:00:00
    2 2 2018-05-18 11:30:00 2018-05-18 15:30:00
    3 4 2018-05-18 15:00:00 2018-05-18 16:00:00

    Now i want to know, how many Employee are needed maximum concurrently. In this case, the result has to be 6, because, ID2& ID3are overlapping and the sum of 2 and 4 is 6.

    ID1 and ID2are also overlapping, but the sum of 1 and 2 is small then the other result, you know?

    I really have no idea how to design this query... Can sombody help me with that?

    Pagekit itself has implemented a check that ensures that php pagekit can only be called in CLI mode. Since the provider does not support this, I would like to build an alternative entry point that bypasses the CLI check.

    Because when I call my provider in the shell php pagekit, I always get the message that it has to be called in the command line.

    I would then put the new entry point into a directory of my component and protect it with an .htaccess file from outside. So I can only call it from the shell.


    the provider of one of my customers does not allow to run php scripts in php-cli-mode. :cursing:

    I wanted to call some command by cronjob. At first glance this is not possible.

    Now i have following idea to create an workarround for that.

    I would copy the index.php from the pagekit root directroy to an folder that's protected by .htaccesslike this:

    1. deny from all

    With that config, the file is not reachable from the web. Then i would change the index.php to this:

    What do you think about that? Is that an Security Problem?


    i‘m using VueJs in one of my extensions in the frontend of my website. When i update my extension (js has changed) the old version of js will still be used. Only when i clear the browser cache the new version will be used.

    How can i be sure that the new version instantly will be used?

    So you would store the pdf temporary at the server? How can i prevent that the file is reachable public? :-)

    In symfony only the files located in the webdirectory are public.. in pagekit all folders are public, right?