Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Inactive users] SMTP and IMAP Authenticator override #1362

Open
Arsnael opened this issue Dec 4, 2024 · 0 comments
Open

[Inactive users] SMTP and IMAP Authenticator override #1362

Arsnael opened this issue Dec 4, 2024 · 0 comments

Comments

@Arsnael
Copy link
Member

Arsnael commented Dec 4, 2024

After implementing the redis part to write user's login activity, we need to be able to actually store the data.

The goal here would be to implement a new Authenticator on Tmail, like TMailUserRepositoryAuthenticator that would:

  • inject the used Authenticator
  • inject the redis part

We could then just call the method of the underlying Authenticator, and if auth is successful, we store the user login info in redis.

We can get the info from the MDC / context :

org.slf4j.MDC.get("ip")
clock.instant()
org.slf4j.MDC.get("protocol")
org.slf4j.MDC.get("user-agent")

We might need to do a little addition on James side beforehand though to propagate the MDC context upon login.

DoD: Integration tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant