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: swagger docs omit brower based credentials, rely on swagger auth#13742

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 2 commits intomainfromstevenmasley/swagger_docs_error
Jul 1, 2024

Conversation

Emyrk
Copy link
Member

@EmyrkEmyrk commentedJul 1, 2024
edited
Loading

Swagger has an "Authorize" button which should be the only authentication being used in the api requests

Closes#13535

Note: I considered implementing CSRF in the interceptor which would just use the logged in user credentials. But theAuthorize button will still exist, and it would be even more confusing since the cookie auth supersedes the header based auth. So swagger requiring explicit authentication feels safer.

Swagger has an "Authorize" button which should be the onlyauthentication being used in the api requests
@EmyrkEmyrk mentioned this pull requestJul 1, 2024
@EmyrkEmyrk marked this pull request as ready for reviewJuly 1, 2024 18:36
@EmyrkEmyrk requested a review fromaslilacJuly 1, 2024 18:36
Copy link
Member

@aslilacaslilac left a comment

Choose a reason for hiding this comment

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

this is awful, but it seems like it's all in ways that aren't your fault, so whatever 😂

//
// So remove authenticating via a cookie, and rely on the authorization
// header passed in.
httpSwagger.UIConfig(map[string]string{
Copy link
Member

Choose a reason for hiding this comment

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

I hate that they use amap[string]string for this instead of a struct 😭

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Not even a link to the docs 😢

Comment on lines +109 to +112
"requestInterceptor":`(a => {
a.credentials = "omit";
return a;
})`,
Copy link
Member

@aslilacaslilacJul 1, 2024
edited
Loading

Choose a reason for hiding this comment

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

their recommendation is just to embed javascript in a string??? I extra hate that

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

@EmyrkEmyrk merged commit10c2817 intomainJul 1, 2024
@EmyrkEmyrk deleted the stevenmasley/swagger_docs_error branchJuly 1, 2024 18:44
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJul 1, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@aslilacaslilacaslilac approved these changes

Assignees

@EmyrkEmyrk

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Swagger CSRF Error
2 participants
@Emyrk@aslilac

[8]ページ先頭

©2009-2025 Movatter.jp