Skip to content

provide better HTTP responses for certain OAuth2 error scenarios#5477

Merged
softwarefactory-project-zuul[bot] merged 1 commit into
ansible:develfrom
ryanpetrello:oauth-500
Dec 10, 2019
Merged

provide better HTTP responses for certain OAuth2 error scenarios#5477
softwarefactory-project-zuul[bot] merged 1 commit into
ansible:develfrom
ryanpetrello:oauth-500

Conversation

@ryanpetrello

Copy link
Copy Markdown
Contributor

attempting to use an OAuth2 token as an externally authenticated user throws an HTTP 500 error when external oauth is disabled - this change improves that so it's a 401 Unauthorized instead.

@ryanpetrello

Copy link
Copy Markdown
Contributor Author

Before:

image

After:

image

image

@softwarefactory-project-zuul

Copy link
Copy Markdown
Contributor

Build succeeded.

@ryanpetrello ryanpetrello force-pushed the oauth-500 branch 2 times, most recently from 1eb6474 to 039f570 Compare December 10, 2019 16:21
Context manager executing transaction.on_commit() hooks immediately as
if the connection was in auto-commit mode.
"""
def on_commit(func):

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.

@rooftopcellist rooftopcellist left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@softwarefactory-project-zuul

Copy link
Copy Markdown
Contributor

Build succeeded.

attempting to use an OAuth2 token as an externally authenticated user throws an HTTP 500 error when external oauth is disabled - this change improves that so it's a 401 Unauthorized instead.
@ryanpetrello ryanpetrello changed the title provide a better error for OAuth2 logins for external accounts provide a better error for certain OAuth2 error scenarios Dec 10, 2019
@ryanpetrello ryanpetrello changed the title provide a better error for certain OAuth2 error scenarios provide better HTTP responses for certain OAuth2 error scenarios Dec 10, 2019
@softwarefactory-project-zuul

Copy link
Copy Markdown
Contributor

Build succeeded.

@softwarefactory-project-zuul

Copy link
Copy Markdown
Contributor

Build succeeded (gate pipeline).

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