Auth: Accept access token as passwd with fail rate limit #782 #808 #3943

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2024-01-14 18:28:17 +01:00
parent 9586a9ec69
commit fed1d8ad95
71 changed files with 930 additions and 507 deletions

View File

@@ -31,9 +31,9 @@ func AddDownloadHeader(c *gin.Context, fileName string) {
c.Header(header.ContentDisposition, fmt.Sprintf("attachment; filename=%s", fileName))
}
// AddSessionHeader adds a session id header to the response.
func AddSessionHeader(c *gin.Context, id string) {
c.Header(header.XSessionID, id)
// AddAuthTokenHeader adds an X-Auth-Token header to the response.
func AddAuthTokenHeader(c *gin.Context, authToken string) {
c.Header(header.XAuthToken, authToken)
}
// AddContentTypeHeader adds a content type header to the response.