简体   繁体   English

Mulesoft和Salesforce的身份验证问题

[英]Authentication problems with Mulesoft and Salesforce

I have a Mule application which uses the Salesforce connector. 我有一个使用Salesforce连接器的Mule应用程序。 When I started developing this application, I first used oAuth to connect to Salesforce, but it kept giving me the following error: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key: <key> 当我开始开发该应用程序时,我首先使用oAuth连接到Salesforce,但它始终给我以下错误: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key: <key> Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key: <key> , so I switched to basic authentication for Salesforce. Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key: <key> ,所以我切换到Salesforce的基本身份验证。

This has worked great, but now, after some time, the application still throws the Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key: <key> 效果很好,但是现在,一段时间后,应用程序仍然抛出Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key: <key>Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key: <key> Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key: <key> error. Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key: <key>错误。

This is unexpected behaviour, since each request contains the username, password and secret token. 这是意外行为,因为每个请求都包含用户名,密码和秘密令牌。

It looks to me like some old version is in the Mule cache or something, which makes it want to use the oAuth method again. 在我看来,某些旧版本位于Mule缓存中或其他内容,这使其希望再次使用oAuth方法。 Is this a possibility? 这有可能吗?

Any ideas on how to fix this? 有想法该怎么解决这个吗?

@Sytze You need to check the flag in the Salesforce connector for all applications sharing the same user credentials to Disable session invalidation (disableSessionInvalidation="true"). @Sytze您需要在Salesforce连接器中检查所有共享相同用户凭据以禁用会话无效(disableSessionInvalidation =“ true”)的应用程序的标志。 What is likely happening is one of your other applications is invalidating the session while your current app still believes its active. 可能发生的情况是您的其他应用程序之一使会话无效,而您当前的应用程序仍认为该会话处于活动状态。

In the connector configuration , check for the correct Token code ( generated via sfdc ) . 在连接器配置中,检查正确的令牌代码(通过sfdc生成)。

Update the latest code and try again 更新最新代码,然后重试

Your security token that you add with your password while calling it would have expired. 您在调用时用密码添加的安全令牌将过期。 Create a new token for you account/email-id in salesforce and use that and it should work 在Salesforce中为您的帐户/电子邮件ID创建一个新令牌并使用它,它应该可以工作

Best would be to use the oAuth to call salesforce. 最好的方法是使用oAuth致电salesforce。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM