SwivelSettings Documentation
Contents
Overview
Class name: SwivelSettings
Namespace: swivelsecure.client
Settings used for communication with Swivel server.
Initialisers
NOTE: this class does not have any public constructors. Instead, instances are created using static initialiser properties and methods as follows:
static SwivelSettings SettingsFromConfiguration
Returns a new SwivelSettings instance loaded from web.config.
static SwivelSettings SettingsFromLocation(string location)
Read settings from a specified XML file location: The file from which to read the settings Returns A new SwivelSettings instance loaded from the specified file, or null if the file is not valid.
static SwivelSettings EmptySettings
Returns a new SwivelSettings instance. The values of all settings will be blank.
Methods
void LoadSettingsFromConfiguration()
Load the settings from web.config.
bool LoadSettings(string location)
Load settings from a specified XML file. location: The full path to the settings file Returns True if the file contains a valid XML document. Also returns True if the file does not exist, in which case the settings are set to defaults.
bool SaveSettings(string location)
Save the current settings to a file location: The full path to the file to update Returns True if the file was created or updated successfully. Warning: does not create the file if it did not previously exist, but still returns True.
void SetDefaults()
Set sensible default values for all settings.
static void RemoveSettings(string configFile)
Remove PINsafe settings from a web.config file. This requires that the PINsafe settings are contained between XML comments of the form <!--PINsafe Settings--> ... <!--End of PINsafe Settings--> configFile: The full path to the web.config file to be altered
Properties
NOTE: properties are read/write unless otherwise indicated.
bool Ssl
True if HTTPS should be used to communicate with Swivel Server, false if HTTP should be used.
string Server
The host name or IP address of the Swivel Server.
int Port
The port used by the Swivel Server.
string Context
The Swivel server context.
string Secret
The shared secret used when communicating with the Swivel Server.
bool AcceptSelfSigned
True if SSL certificate errors should be ignored when communicating with the Swivel Server.
bool AllowNonPINsafeUsers
True if usernames not recognised by Swivel server should be authenticated automatically. If false, unknown users will be rejected.
bool IgnoreDomainPrefix
True if the domain prefix in usernames such as domain\user should be stripped off before checking with Swivel server.
bool IgnoreDomainSuffix
True if the domain suffix in usernames such as user@domain should be stripped off before checking with Swivel server.
string AgentVersion
The string sent as the Version attribute in Agent requests.
AllowUserAttributes
True if the current version supports user attributes. Read-only: set to True if AgentVersion is 3.97 or higher.