Giter VIP home page Giter VIP logo

Comments (7)

tuupola avatar tuupola commented on May 18, 2024

What are the errors you found?

from slim-basic-auth.

ChanderTambia avatar ChanderTambia commented on May 18, 2024

it was incomplete and you were using values instead of keys to get array value if i am right. sorry if i am wrong i am a newbie here fresher developer :)

from slim-basic-auth.

tuupola avatar tuupola commented on May 18, 2024

I mean what error do you encounter? Other way to ask it is does PHP show you an error message? Also what does not work as you expect and how do you expect it to work?

from slim-basic-auth.

ChanderTambia avatar ChanderTambia commented on May 18, 2024

i was getting 'false' in return every time when authenticate. i was using Basic Authorization.

from slim-basic-auth.

tuupola avatar tuupola commented on May 18, 2024

Ok, for that copy paste here the code used for initialising the middleware. For example:

$app->add(new Tuupola\Middleware\HttpBasicAuthentication([
    "path" => "/admin",
    "realm" => "Protected",
    "users" => [
        "root" => "t00r",
        "somebody" => "passw0rd"
    ],
]));

Also copy paste an example of failing request and response done with curl (no screenshots, they are not helpful). For example:

$ curl "https://example.com/admin" \
    --include \
    --insecure \
    --user somebody:passw0rd

from slim-basic-auth.

Bisa avatar Bisa commented on May 18, 2024

@ChanderTambia I ran into your issue as well, no matter what I did the authentication kept returning false. However, in my debugging I found that the Authorization header was never passed to PHP, as such the code always rejected my login requests.

After some looking around I realized that since I'm using FastCGI I needed to configure my server to pass the headers along, this is also explained here:
https://github.com/tuupola/slim-basic-auth#usage-with-fastcgi

Any way, what I'm trying to say is, have you checked to ensure the header reaches the class upon execution? The current latest version works for me as soon as I fixed my configuration.

from slim-basic-auth.

tuupola avatar tuupola commented on May 18, 2024

Closing due no feedback.

from slim-basic-auth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.