quantranhong1999 commented on a change in pull request #791:
URL: https://github.com/apache/james-project/pull/791#discussion_r767568120
##########
File path:
protocols/imap/src/main/java/org/apache/james/imap/api/process/ImapSession.java
##########
@@ -234,9 +233,11 @@ default Username getUserName() {
.orElse(null);
}
- default boolean isPlainAuthDisabledEventually() {
- boolean isPlainAuthDisabled = !isPlainAuthEnabled();
- boolean isPlainAuthDisabledWhenNotEncrypted = isPlainAuthDisallowed()
&& !isTLSActive();
- return isPlainAuthDisabled || isPlainAuthDisabledWhenNotEncrypted;
+ default boolean isPlainAuthDisallowed() {
+ return !isPlainAuthEnabled() ||
isAuthenticatingNonEncryptedWhenRequiredSSL();
+ }
+
+ default boolean isAuthenticatingNonEncryptedWhenRequiredSSL() {
Review comment:
I expose this to reuse for OIDC case also. Does this make you more
clear, @chibenwa ?
--
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]