Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: external auth validate response "Forbidden" should return invalid, not an error#13446

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Emyrk merged 4 commits intomainfromstevenmasley/suspended_user_delete_workspace
Jun 3, 2024

Conversation

Emyrk
Copy link
Member

@EmyrkEmyrk commentedJun 3, 2024
edited
Loading

Problem

User reported unable to delete a workspace because idp was returning a 403 on external auth Validate.

What this does

Prior to this change a 401 (unauthorized) yields an invalid token. 403s (forbidden) were counted as errors. Now both 401 and 403 yield unauthorized.

Not other 400 status codes would still yield an error and fail the workspace build.

@@ -218,7 +218,7 @@ func (c *Config) ValidateToken(ctx context.Context, link *oauth2.Token) (bool, *
return false, nil, err
}
defer res.Body.Close()
if res.StatusCode == http.StatusUnauthorized {
if res.StatusCode == http.StatusUnauthorized|| res.StatusCode == http.StatusForbidden{
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

This is the fix. Everything else is just unit testing

@EmyrkEmyrk merged commit27f2691 intomainJun 3, 2024
26 checks passed
@EmyrkEmyrk deleted the stevenmasley/suspended_user_delete_workspace branchJune 3, 2024 18:16
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJun 3, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@kylecarbskylecarbskylecarbs approved these changes

Assignees

@EmyrkEmyrk

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Emyrk@kylecarbs

[8]ページ先頭

©2009-2025 Movatter.jp