mirror of
https://github.com/coder/coder.git
synced 2025-07-08 11:39:50 +00:00
fix: remove authentication requirement for /users/login
(#5717)
This was noticed by a member of our Discord being incorrectly documented! https://discord.com/channels/747933592273027093/1063494965130432632/1063503805016182875
This commit is contained in:
5
coderd/apidoc/docs.go
generated
5
coderd/apidoc/docs.go
generated
@ -2865,11 +2865,6 @@ const docTemplate = `{
|
||||
},
|
||||
"/users/login": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"CoderSessionToken": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
|
5
coderd/apidoc/swagger.json
generated
5
coderd/apidoc/swagger.json
generated
@ -2517,11 +2517,6 @@
|
||||
},
|
||||
"/users/login": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"CoderSessionToken": []
|
||||
}
|
||||
],
|
||||
"consumes": ["application/json"],
|
||||
"produces": ["application/json"],
|
||||
"tags": ["Authorization"],
|
||||
|
@ -297,7 +297,8 @@ func assertPathParametersDefined(t *testing.T, comment SwaggerComment) {
|
||||
func assertSecurityDefined(t *testing.T, comment SwaggerComment) {
|
||||
if comment.router == "/updatecheck" ||
|
||||
comment.router == "/buildinfo" ||
|
||||
comment.router == "/" {
|
||||
comment.router == "/" ||
|
||||
comment.router == "/users/login" {
|
||||
return // endpoints do not require authorization
|
||||
}
|
||||
assert.Equal(t, "CoderSessionToken", comment.security, "@Security must be equal CoderSessionToken")
|
||||
|
@ -988,7 +988,6 @@ func (api *API) organizationByUserAndName(rw http.ResponseWriter, r *http.Reques
|
||||
//
|
||||
// @Summary Log in user
|
||||
// @ID log-in-user
|
||||
// @Security CoderSessionToken
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Tags Authorization
|
||||
|
Reference in New Issue
Block a user