Skip to content

HTTP Basic Authentication in Lumen 5.2 #388

@arubacao

Description

@arubacao

In Lumen 5.1 I used the out-of-the-box onceBasic authentication as described here: Laravel 5.1 Docs
In Lumen 5.2 I could only find the onceBasic method in the SessionGuard.php.
Unfortunately i'll get a

Class session.store does not exist

trying to authenticate with this guard.
This makes sense since Sessions aren't available in Lumen 5.2.
However, i'd still like to use HTTP Basic Auth for my application.

For now I wrote my own BasicGuard which is mainly the SessionGuard but without all of the session stuff.
This works great for me, but I'm wondering if there is a better fix for this - or maybe this isn't even a problem and i'm missing something?

So my final question is eventually:

1. How to authenticate with HTTP Basic Auth (in Lumen 5.2)?
2. How did the creator(s) intent to transfer the token (for token based auth) from the server to a client (in Lumen 5.2)?

Cheers,
Chris

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions