events: fix incorrect EventAction being used
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
7bc63791c9
commit
f8ef2b666f
|
@ -65,7 +65,7 @@ def on_login_failed(
|
|||
**kwargs,
|
||||
):
|
||||
"""Failed Login, authentik custom event"""
|
||||
Event.new(EventAction.USER_WRITE, **credentials, stage=stage, **kwargs).from_http(request)
|
||||
Event.new(EventAction.LOGIN_FAILED, **credentials, stage=stage, **kwargs).from_http(request)
|
||||
|
||||
|
||||
@receiver(invitation_used)
|
||||
|
|
|
@ -29,7 +29,6 @@ from authentik.providers.oauth2.apps import AuthentikProviderOAuth2Config
|
|||
from authentik.providers.oauth2.constants import (
|
||||
ACR_AUTHENTIK_DEFAULT,
|
||||
AMR_MFA,
|
||||
AMR_OTP,
|
||||
AMR_PASSWORD,
|
||||
AMR_WEBAUTHN,
|
||||
)
|
||||
|
@ -474,6 +473,7 @@ class RefreshToken(SerializerModel, ExpiringModel, BaseGrantModel):
|
|||
token["uid"] = generate_key()
|
||||
return self.provider.encode(token)
|
||||
|
||||
# pylint: disable=too-many-locals
|
||||
def create_id_token(self, user: User, request: HttpRequest) -> IDToken:
|
||||
"""Creates the id_token.
|
||||
See: http://openid.net/specs/openid-connect-core-1_0.html#IDToken"""
|
||||
|
|
|
@ -156,7 +156,7 @@ class TestProviderLDAP(SeleniumTestCase):
|
|||
Event.objects.filter(
|
||||
action=EventAction.LOGIN_FAILED,
|
||||
user={"pk": anon.pk, "email": anon.email, "username": anon.username},
|
||||
)
|
||||
).exists(),
|
||||
)
|
||||
|
||||
@retry()
|
||||
|
|
Reference in New Issue