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

Implements #449 Make authentication details available in MovingMessage #450

Merged

Commits on Mar 29, 2022

  1. Implements greenmail-mail-test#449 Make authentication details availa…

    …ble in MovingMessage
    
    * Implements greenmail-mail-test#449: Stores the authentication details in the moving
    message so that it is available in e.g. MessageDeliveryHandler
    * Since different authentication methods have different details, there's
    a AuthenticationState base interface with PlainAuthenticationState (with
    an additional authorizationId) and LoginAuthenticationState POJOs for
    the currently supported AUTH mechanisms LOGIN and AUTH. Other AUTH
    mechanisms may or may not have a username and/or password.
    * What I don't fully understand is why the SMTPState needs to be cleared
    so often. It's also cleared by the MailCommand, which removes the
    authentication details from the MovingMessage. I modfied the MailCommand
    so that it clears the SMTPState, but transfers the authentication
    details from the old moving message to the new one. We could also store
    the authentication details in the SMTPState as well, but that feels a
    bit redundant.
    * When I run the tests locally, the
    DummySSLServerSocketFactoryTest#testLoadKeyStoreViaSystemProperty fails,
    but that's because I don't have a certificate with an `amazonrootca1` in
    my system root key store (there is, e.g. a `debian:amazon_root_ca_1.pem`
    certificate and when I change the test to use that, it passes)
    blutorange committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    6abf159 View commit details
    Browse the repository at this point in the history