This commit is contained in:
David Heinemeier Hansson
2025-12-02 12:26:22 +01:00
committed by Stanko K.R.
parent 467843fe22
commit 7d2c284726
+2 -2
View File
@@ -56,9 +56,9 @@ module Authentication
end
def authenticate_by_bearer_token
scheme, bearer_token = request.authorization.to_s.split(" ", 2)
authorization_scheme, bearer_token = request.authorization.to_s.split(" ", 2)
if scheme == "Bearer" && bearer_token.present?
if authorization_scheme == "Bearer" && bearer_token.present?
if access_token = Identity::AccessToken.find_by(token: bearer_token)
Current.identity = access_token.identity
else