Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add authorization for auto-created realm #52

Open
khallouki opened this issue Feb 24, 2017 · 0 comments
Open

add authorization for auto-created realm #52

khallouki opened this issue Feb 24, 2017 · 0 comments

Comments

@khallouki
Copy link

khallouki commented Feb 24, 2017

Hello,

I have a question. I managed to implement a authorization module for my router:

$authorizationManager = new \Thruway\Authentication\AuthorizationManager('testrealm');

$rule = new stdClass();
$rule->role = "teacher";
$rule->action = "register";
$rule->uri = "cnf.quiz.addstudent";
$rule->allow = true;

$authorizationManager->addAuthorizationRule([$rule]);

Whenever a new user is connecting and the realm doesn't exist, it creates it:

[Thruway\RealmManager 31922] Got prehello...
[Thruway\RealmManager 31922] Creating new realm "01234"
[Thruway\RealmManager 31922] Adding realm "01234"

But the authorization doesn't aply for this newly created realm. Is there a way to add the authorization to the newly auto created realm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant