quantranhong1999 commented on code in PR #3059:
URL: https://github.com/apache/james-project/pull/3059#discussion_r3425598827


##########
protocols/api/src/main/java/org/apache/james/protocols/api/sasl/SaslMechanism.java:
##########
@@ -31,5 +31,14 @@ public interface SaslMechanism {
     /**
      * Starts a new SASL exchange for one client authentication attempt.
      */
-    SaslExchange start(SaslInitialRequest request);
+    SaslExchange start(SaslInitialRequest request, SaslAuthenticator 
authenticator);
+
+    /**
+     * Whether this mechanism may be used over the current transport.
+     *
+     * @param channelEncrypted whether the underlying transport is encrypted, 
for example with TLS.
+     */
+    default boolean isAvailableOnTransport(boolean channelEncrypted) {

Review Comment:
   `ImapSession` does not extend `ProtocolSession`, therefore `ProtocolSession` 
is not generic enough to be used here...
   
   Unless we refactor `ImapSession` to extend `ProtocolSession`, which feels 
like another core refactoring.
   
   I guess we can live with `boolean channelEncrypted` for now, and refactor it 
further later if needed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to