bigpresh / bigpresh/Dancer-Plugin-Auth-Extensible

make require_login and require_role available in the load_app

Open
#15 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Perl
Stars
23
Forks
17
PR merge metrics
No merged PRs in 30d

Description

It would be cool to be able to:

``` perl
load_app 'App::User', prefix => '/user', require_login
load_app 'App::Admin', prefix => '/admin', require_role Admin
```

And then also be able to use it in the loaded apps:

``` perl
package App::User
use Dancer ':syntax';

### you only get here if you are logged in, but the next action is only available if you are an Editor
get '/' => require_role Editor => sub {
return 'You are Editor :)';
};

true;
```

Just an Idea, have not seen any possibility to do that yet ... maybe I overlooked something?

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the load_app, require_login, and require_role entry points and determine how authentication and authorization are currently applied. Define the behavior for passing require_login or require_role to load_app and for using require_role inside a loaded app. Done means both example usage patterns work with clear tests or documented acceptance criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
authentication, authorization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.