-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into parent-location-sync
- Loading branch information
Showing
56 changed files
with
5,915 additions
and
4,298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,8 +28,8 @@ type ( | |
} | ||
|
||
LoginForm struct { | ||
Username string `json:"username"` | ||
Password string `json:"password"` | ||
Username string `json:"username" example:"[email protected]"` | ||
Password string `json:"password" example:"admin"` | ||
StayLoggedIn bool `json:"stayLoggedIn"` | ||
} | ||
) | ||
|
@@ -79,17 +79,15 @@ type AuthProvider interface { | |
|
||
// HandleAuthLogin godoc | ||
// | ||
// @Summary User Login | ||
// @Tags Authentication | ||
// @Accept x-www-form-urlencoded | ||
// @Accept application/json | ||
// @Param username formData string false "string" example([email protected]) | ||
// @Param password formData string false "string" example(admin) | ||
// @Param payload body LoginForm true "Login Data" | ||
// @Param provider query string false "auth provider" | ||
// @Produce json | ||
// @Success 200 {object} TokenResponse | ||
// @Router /v1/users/login [POST] | ||
// @Summary User Login | ||
// @Tags Authentication | ||
// @Accept x-www-form-urlencoded | ||
// @Accept application/json | ||
// @Param payload body LoginForm true "Login Data" | ||
// @Param provider query string false "auth provider" | ||
// @Produce json | ||
// @Success 200 {object} TokenResponse | ||
// @Router /v1/users/login [POST] | ||
func (ctrl *V1Controller) HandleAuthLogin(ps ...AuthProvider) errchain.HandlerFunc { | ||
if len(ps) == 0 { | ||
panic("no auth providers provided") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.