Cookie provider assembly
Use the following information to create your custom assembly for Cookie provider.
The SharePoint component allows the user to create his/her own assembly that will be used as a custom cookie provider service for user authentication.
To create a custom cookie provider assembly, you should implement the ICookieProvider interface presented by the special NSi.ICookieProvider assembly distributed together with the SharePoint component assemblies.
Your assembly must contain the only class with the implementation of the provided interface.
The following code represents the ICookieProvider interface which should be implemented in the custom assembly:
namespace NSi.CookieProvider
{
public interface ICookieProvider
{
/// <summary>
/// This method sets a URL of the web application to be accessed.
/// </summary>
/// <param name="url">Web application URL that contains a protocol, a server address and a port.</param>
void setWebApplication(string url);
/// <summary>
/// This method sets user credentials for authentication.
/// </summary>
/// <param name="claim">A claim can be any statement about an entity; for example, the user name.</param>
/// <param name="password">User's password. </param>
void setUserCredentials(string claim, string password);
/// <summary>
/// This method gets a cookie container that allows accessing the resources of the desired SharePoint server.
/// </summary>
CookieContainer getCookieContainer();
}
}
The input parameters of both setWebApplication(string url) and setUserCredentials(string claim, string
password) methods are retrieved from the component and are entered by the user on the General tab.