We have a customer that has his Nintex APIs deployed on a web site authenticated by Forms Authentication.
Is there an easy way provided by Nintex to by pass it? if not, can you please advise how to authenticate the API calls?
Got a solution, authenticated it like any WCF service that requires Forms Authentication. Please advise if there's a better one.
Here's the solution just in case someone needs it.
//Authentication service is listed under "_vti_bin" for the selected sharepoint site that would be "[sharepoint site url]/_vti_bin/Authentication.asmx"
AuthenticationSoapClient authClient = new AuthenticationSoapClient();
using (var scope = new OperationContextScope(authClient.InnerChannel))
var response = authClient.Login("username", "password");
var httpProperties = (HttpResponseMessageProperty)OperationContext.Current.IncomingMessageProperties[HttpResponseMessageProperty.Name];
var headers = httpProperties.Headers;
cookie = headers["Set-Cookie"];
NintexSoapClient nintexClient = new NintexSoapClient();
using (var scope = new OperationContextScope(nintexClient.InnerChannel))
HttpRequestMessageProperty requestMessage = new HttpRequestMessageProperty();
requestMessage.Headers["Cookie"] = cookie;
OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = requestMessage;
//call any nintex api here, for example:
//ConfiguredOutcome userTasks = nintexClient.GetOutcomesForFlexiTask(123, "list name");
Retrieving data ...