This class enables a third-party to implement a custom authenticator for the Web Player
server.
Inheritance Hierarchy
Spotfire.Dxp.WebCustomAuthenticator
Namespace: Spotfire.Dxp.Web
Assembly: Spotfire.Dxp.Web (in Spotfire.Dxp.Web.dll) Version: 25.11.10401.3615 (25.11.10401.3615)
Syntax
C#
public abstract class CustomAuthenticator
The CustomAuthenticator type exposes the following members.
Constructors
Name | Description | |
---|---|---|
CustomAuthenticator |
Initializes a new instance of the CustomAuthenticator class.
|
Methods
Name | Description | |
---|---|---|
AuthenticateTokenCore |
Performs the user authentication. The AuthenticationContext parameter
can be used to retrieve information about the user to authenticate.
| |
CreateIdentity |
Creates a Spotfire specific instance of the IIdentity interface
from a user name string.
| |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IsLogoutEnabledCore |
Override this to specify whether logout should be enabled.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
Remarks
Examples
C#
// Custom autenticator class. // Note: For brevity, some details are intentionally omitted. public class TestAuthenticator : CustomAuthenticator { // Empty constructor required public TestAuthenticator() : base() { } protected override IIdentity AuthenticateTokenCore(AuthenticationContext context) { string userName = String.Empty; string portalConnectionInfo = null; // Assuming the token is contained in the request header string token = context.Context.Request.Headers["token"]; System.Configuration.Configuration webConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(null); // This exampel relies on custom settings. if (0 < webConfig.AppSettings.Settings.Count) { System.Configuration.KeyValueConfigurationElement customSetting = webConfig.AppSettings.Settings["PortalConnectionInfo"]; // Required setting throw exception if it doesn't exist. if (null != customSetting) { portalConnectionInfo = customSetting.Value; } else { // Error, throw exception } } else { // Error, throw exception } // // Authenticate against the Portal server using // portalConnectionInfo, assign the user name // corresponding to the <c>token</c> to the // <c>userName</c> parameter. // // Use the CreateIdentity helper method to create an // IIdentity object of correct type. return CreateIdentity(userName); } }
Version Information
See Also