Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:Zimbra/zm-mailbox into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
swaatiTelus committed Nov 7, 2022
2 parents 1ad4563 + 00365db commit fa57fac
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions store/src/java/com/zimbra/cs/account/auth/AuthContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ public class AuthContext {
*/
public static final String AC_REMOTE_IP = "remoteip";

/*
* Port as seen from ZimbraSoapContext in:
* zm-mailbox/store/src/java/com/zimbra/cs/service/admin/Auth.java
* Present in context for SOAP (web-UI and SMTP authentication)
*
* To be used with ZimbraCustomAuth extensions to distinguish
* between SMTP and web-UI authentication.
*
* Example this is true for an SMTP auth request:
* if (context.get("soapport").equals(account.getServer().getMtaAuthPort()))
*
* type: Integer
*/
public static final String AC_SOAP_PORT = "soapport";

/*
* Account name passed in to the interface.
* Present in context for SOAP and http basic authentication.
Expand Down
1 change: 1 addition & 0 deletions store/src/java/com/zimbra/cs/service/account/Auth.java
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ public Element handle(Element request, Map<String, Object> context) throws Servi
authCtxt.put(AuthContext.AC_REMOTE_IP, context.get(SoapEngine.SOAP_REQUEST_IP));
authCtxt.put(AuthContext.AC_ACCOUNT_NAME_PASSEDIN, acctValuePassedIn);
authCtxt.put(AuthContext.AC_USER_AGENT, zsc.getUserAgent());
authCtxt.put(AuthContext.AC_SOAP_PORT, zsc.getPort());

AuthMode mode = AuthMode.PASSWORD;
String code = password;
Expand Down

0 comments on commit fa57fac

Please sign in to comment.