Custom authentication example

(9 posts) (2 voices)
  1. chadwickhung, Member

    I'd like to know more about Custom authentication since the document on this part is quite limited. Could you please provide an example? I'm running an application server by Php/Mysql and wanted to perform our MYDBR authentication by the same mechanism so that we don't need to maintain the same user in 2 places.
    Thanks a lot.

    Chadwick

  2. myDBR Team, Key Master

    Is myDBR connected to your application server application? If that is the case, you can use the Single Sign-On as it will be better for users as you only need login once.

    --
    myDBR Team

  3. chadwickhung, Member

    Thanks. Actually, our server is for our iOS application. So there is no user login to any web application. As we already have our user/password table in the application database, we wish to have our report server to use the same user/password table instead of keeping a separate set of it. Please kindly advise.
    Thanks!
    Chadwick

  4. myDBR Team, Key Master

    Do take advantage of the custom authentication, you override the mydbr/user/custom_authentication.php Custom_authentication class's authenticate-method.

    When user logs in the Custom_authentication::authenticate( username, password ) is called, you will need to verify the username/password combo and if successful, return the array shown in the custom_authentication.php, if you reject the login, return null.

    --
    myDBR Team

  5. chadwickhung, Member

    Thanks. But in the default file, it's empty. Could you provide me a sample please?
    Best regards,
    Chadwick

    <?php //0008c
    // Copyright myDBR.com Ltd 2007-2014 http://www.mydbr.com
    // All rights reserved
    // myDBR 4.3.4
    include('install/loader.php');
    ?>
    HR+cPpKNBm8v+fCrbAYw8LpoCGDvQ6JZdqMdZMt8aFc207njNDrgOt1IMsrbJUwEItzx3AMYsMTX
    pfsiYP9JQyBcPe6sfX+ENQ1pkkNM3MNiRBozNY8GJMqNKkBKc70NWjDyLPnStsO+6KzrbcDw3VGT
    AQSjmaCFV4JrgSWczxCZEwTMBC92r55fT7ljdqqokBRH3eYTcjOe1N+FmiTOPVPfqV28ZURvacjq
    +ReqeuXX4kO3C3S950wntmA15/L8R8fjqOhZgD2KvydYe2aCOzplQZG8h/kPhaXcliqBFxlRk8+W
    i2ybMCrK/aLkjEmOFfnUb7A6SvEdhHGjWU9NgTMB1KPh9zZpku50s9o9ZcsaGX7qEipfpnXd65Ms
    g3V7PYiHZ+pHnL6BHd7/OSTczQX/KkmgOnAorWJzKKJt9+CmMUbEMOCJAEexqUZsA7VmkSK+ryMD
    dFxoHYS9gwgSRKUXIlyrccEv0Yf/L362AQX3W4fjOlvaDDOIj4r5HmSE8vZq89SVPl4F1rFwNz3n
    a9Wa1GazVNLGZhWUuxiZLg5EFZuvo6ZCl+s6HkOog2XRR3GOqVlkFrBJTk+K6XnlefiG5aRQsTN3
    BDZ0u8coUUhUfyKKNpJsNCkOliDbG0ANmp7OqBSqeUICmuKktU1Ky5dAba8VQ7ObzMoVFRRQBEBD
    8YmoXcnVwxsxI6/IzAlVWzO4UmnkC57XhlzF1wkyKWsRxk7PuphsaBsZp0u5IdSnpRTqn5Er98yI
    rW+oP8gLcdl1iKjtNxGogCU1kyCtFpVTH8Dw24VFXqTsth7FriL0bEz32IP5huO7kB4keIUGLkIt
    Iii5GK/DOOzJV0PrQh/BU3lPbfXrZhTU28TnIHVYS24egwUcGeKSL0G9lDwMnyYfV8467LSlvxaS
    Ne2eRrMCfvURN5J0c1Vyyye6tBN8VwpIBwhnDeEXHjchGW==

  6. myDBR Team, Key Master

    You can download a copy of the myDRB and extract the file from the zip.

    Also, while you are at it, you can check that you have the latest version of the export_header_pdf.php which was updated in build 2833.

    The user directory is preserved through updates, so myDBR will never overwrite your files.
    --
    myDBR Team

  7. chadwickhung, Member

    OK, we'll try again. Thanks.

  8. chadwickhung, Member

    Dear sir,
    I'm still not able to find a sample of mydbr/user/custom_authentication.php, could be please guide me here.
    Thanks
    Chadwick

  9. myDBR Team, Key Master

    A sample of the Custom Authentication can be found in mydbr/user/custom_authentication.php. Download a copy of myDBR and take a look at the file. What is the problem you are having?

    --
    myDBR Team


Reply

You must log in to post.