Skip to content

Add 403 Forbidden to STANDARD_ERRORS#1362

Merged
nicolaiarocci merged 2 commits into
pyeve:masterfrom
pedro2555:add-403
Mar 14, 2020
Merged

Add 403 Forbidden to STANDARD_ERRORS#1362
nicolaiarocci merged 2 commits into
pyeve:masterfrom
pedro2555:add-403

Conversation

@pedro2555

Copy link
Copy Markdown
Contributor

This isn't actually an error the Eve Framework will ever raise. As far
as I could tell.

However, separation between authentication and authorization is a must
even for less complex applicatons. 403 is the most adequate response a
server can provide to client whose authentication was accepted, yet for
some reason or another the server will not comply with the request.

The Eve Framework documentation suggests the usage of 403 in, at least
two instances:

This isn't actually an error the Eve Framework will ever raise. As far
as I could tell.

However, separation between authentication and authorization is a must
even for less complex applicatons. 403 is the most adequate response a
server can provide to client whose authentication was accepted, yet for
some reason or another the server will not comply with the request.

The Eve Framework documentation suggests the usage of 403 in, at least
two instances:

 * `abort(403)` in: https://docs.python-eve.org/en/stable/features.html#database-event-hooks
 * The actual documentation for the `STANDARD_ERRORS` config variable,
describes 403 as a supported code, in: https://docs.python-eve.org/en/stable/config.html#global-configuration

@pedro2555 pedro2555 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one other possible change is to actually include all error codes defined in RFC7231 section 6.1 or the official registry https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml

@nicolaiarocci nicolaiarocci added this to the 1.1.1 milestone Mar 2, 2020
@pedro2555 pedro2555 closed this Mar 12, 2020
@pedro2555 pedro2555 reopened this Mar 12, 2020
nicolaiarocci added a commit that referenced this pull request Mar 14, 2020
@nicolaiarocci nicolaiarocci merged commit ab21f0c into pyeve:master Mar 14, 2020
@nicolaiarocci

Copy link
Copy Markdown
Member

Thanks.

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

Successfully merging this pull request may close these issues.

2 participants