IDEMPIERE-3101 implement OAuth2 for mail (gmail, outlook and other mail system) (#613)
* Avoid NPE when calling the servlet without parameters
This commit is contained in:
parent
371afa054a
commit
c03fefea79
|
@ -105,11 +105,11 @@ public class OAuthCodeCallbackHandlerServlet extends HttpServlet {
|
|||
}
|
||||
}
|
||||
|
||||
Env.getCtx().setProperty(Env.AD_CLIENT_ID, String.valueOf(pinstance.getAD_Client_ID())); // To avoid Context Lost exception
|
||||
Env.getCtx().setProperty(Env.AD_USER_ID, String.valueOf(pinstance.getCreatedBy())); // To set as CreatedBy of the account
|
||||
MAuthorizationCredential credential = null;
|
||||
MPInstancePara paramAnswer = null;
|
||||
if (errmsg == null) {
|
||||
Env.getCtx().setProperty(Env.AD_CLIENT_ID, String.valueOf(pinstance.getAD_Client_ID())); // To avoid Context Lost exception
|
||||
Env.getCtx().setProperty(Env.AD_USER_ID, String.valueOf(pinstance.getCreatedBy())); // To set as CreatedBy of the account
|
||||
for (MPInstancePara param : pinstance.getParameters()) {
|
||||
if (MAuthorizationCredential.COLUMNNAME_AD_AuthorizationCredential_ID.equals(param.getParameterName()))
|
||||
credential = new MAuthorizationCredential(Env.getCtx(), param.getP_Number().intValue(), null);
|
||||
|
|
Loading…
Reference in New Issue