PerlDancer / PerlDancer/Dancer2-Plugin-Auth-Extensible
logged_in_user sub stores user_hash in the request object
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 10
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
Because the user hash is stored in the request object, one doesn't benefit from storing the hash at all ie the sub never returns on L598.
We use the LDAP auth backend and I see an LDAP lookup for every page load irrespective of if the user has already authenticated.
Correct me if I'm wrong but wouldn't it be better to store the user hash in a session object?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lib/Dancer2/Plugin/Auth/Extensible.pm around logged_in_user at line 597, and trace how the user hash is stored in the request object. Reproduce the LDAP lookup across repeated page loads, then verify that the authentication state is retained in a session and avoids unnecessary lookups.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100