1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-03-23 17:40:07 +00:00

fix: disallow API key renewal and creation with API key authentication (#1334)

This commit is contained in:
Elias Schneider
2026-02-23 20:34:25 +01:00
committed by GitHub
parent b3fe143136
commit 0c41872cd4
5 changed files with 146 additions and 5 deletions

View File

@@ -280,6 +280,13 @@ func (e *APIKeyExpirationDateError) Error() string {
}
func (e *APIKeyExpirationDateError) HttpStatusCode() int { return http.StatusBadRequest }
type APIKeyAuthNotAllowedError struct{}
func (e *APIKeyAuthNotAllowedError) Error() string {
return "API key authentication is not allowed for this endpoint"
}
func (e *APIKeyAuthNotAllowedError) HttpStatusCode() int { return http.StatusForbidden }
type OidcInvalidRefreshTokenError struct{}
func (e *OidcInvalidRefreshTokenError) Error() string {