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

Simplify authorization #1114

Merged
merged 2 commits into from Jun 15, 2015

Conversation

Projects
None yet
4 participants
@arteam
Member

arteam commented Jun 13, 2015

The current implementation of authorization is too cumbersome and requires implementing a big amount of boilerplate code.

This changes introduce Authorizer interface, which is responsible for authorizing users. It's a replacement for specifying a function for creating a new secure context.

Advantage stem from the fact that users only implement business logic for authorization and nothing more. Also this type of API is similar to Authenticator, which makes API more consistent.

arteam added some commits Jun 12, 2015

Simplify authorization
The current implementation of authorization is too cumbersome
and requires implementing a big amount of boilerplate code.

This changes inroduce `Authorizer` interface, which is responsible
for authorizing users. It's a replacement for specifiying a function
for creating a new secure context.

Advantage is stem from the fact that users only implement business
logic for authorization and nothing more. Also this type of API
is similar to `Authenticator`, which makes API more consistent.
Update authorization documentation
* Add a section about an authorizer
* Update example to use `Authorizer<P>`
* Add a note about roles in the `Protecting Resources` section
@glennmcallister

This comment has been minimized.

Show comment
Hide comment
@glennmcallister

glennmcallister Jun 15, 2015

Contributor

I like it, personally. Its easier to read and conceptually more compact than what we have currently.

Contributor

glennmcallister commented Jun 15, 2015

I like it, personally. Its easier to read and conceptually more compact than what we have currently.

@carlo-rtr

This comment has been minimized.

Show comment
Hide comment
@carlo-rtr

carlo-rtr Jun 15, 2015

Member

Agreed, I think it's a better abstraction. I'm still working thru the code, my goal is to have feedback or merge by EOD.

Member

carlo-rtr commented Jun 15, 2015

Agreed, I think it's a better abstraction. I'm still working thru the code, my goal is to have feedback or merge by EOD.

@jplock

This comment has been minimized.

Show comment
Hide comment
@jplock

jplock Jun 15, 2015

Member

This looks a lot better. Great job.

Member

jplock commented Jun 15, 2015

This looks a lot better. Great job.

@jplock jplock added this to the 0.9.0 milestone Jun 15, 2015

carlo-rtr added a commit that referenced this pull request Jun 15, 2015

@carlo-rtr carlo-rtr merged commit 8ea44fa into dropwizard:master Jun 15, 2015

@arteam arteam deleted the arteam:simplify_authorization branch Jan 24, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment