VideoOS.Platform.Login.Util Class Reference

A utility class to build user CredentialCache and NetworkCredential. More...

Static Public Member Functions

static CredentialCache BuildCredentialCache (Uri uri, string userName, SecureString securePassword, string authenticationType)
 Build a CredentialCache with a NetWorkCredential or DefaultCredential depending on the authenticationType string. The username can be a simple name, a domain\username or blank. Blank indicates current credentials should be used. If no domain is entered the current machine default is used.
 
static CredentialCache BuildCredentialCache (Uri uri, string username, string password, string authenticationType)
 Build a CredentialCache with a NetWorkCredential or DefaultCredential depending on the authenticationType string. The username can be a simple name, a domain\username or blank. Blank indicates current credentials should be used. If no domain is entered the current machine default is used.
 
static NetworkCredential BuildNetworkCredential (string userName, SecureString securePassword, string authenticationType)
 Build a CredentialCache with a NetWorkCredential or DefaultCredential depending on the authenticationType string.
The username can be a simple name, a domain\username or blank. Blank indicates current credentials should be used.
If no domain is entered the server machine will determine to use either it's domain or local defined user.
Notice that when creating a "Basic" NetworkCredential, it must be added into a CredentialCache before it can be used. The CredentialCache should then be used for adding servers etc.
 
static NetworkCredential BuildNetworkCredential (Uri uri, string username, string password, string authenticationType)
 Build a CredentialCache with a NetWorkCredential or DefaultCredential depending on the authenticationType string.
The username can be a simple name, a domain\username or blank. Blank indicates current credentials should be used.
If no domain is entered the server machine will determine to use either it's domain or local defined user.
Notice that when creating a "Basic" NetworkCredential, it must be added into a CredentialCache before it can be used. The CredentialCache should then be used for adding servers etc.
 
static NetworkCredential GetCredential (ServerId serverId)
 Retrieve relevant Credentials to be used for a given ServerId.
 
static String GetHostName (String mixedUrl)
 Pick out the servername from any Url or address string.
 
static String GetHostNameWithoutDomain (String mixedUrl)
 Take out any postfix domain names.
 
static SecureString ToSecureString (this string unsecureString)
 Utility method for making a SecureString from a normal string.
 

Detailed Description

A utility class to build user CredentialCache and NetworkCredential.

Member Function Documentation

◆ BuildCredentialCache() [1/2]

static CredentialCache VideoOS.Platform.Login.Util.BuildCredentialCache ( Uri uri,
string userName,
SecureString securePassword,
string authenticationType )
inlinestatic

Build a CredentialCache with a NetWorkCredential or DefaultCredential depending on the authenticationType string. The username can be a simple name, a domain\username or blank. Blank indicates current credentials should be used. If no domain is entered the current machine default is used.

Parameters
uriThe server to use this credential for
userNameBlank or user name possibly preceded with domain name
securePasswordPassword
authenticationTypeEither "Basic" or "Negotiate" for Window type login
Returns

◆ BuildCredentialCache() [2/2]

static CredentialCache VideoOS.Platform.Login.Util.BuildCredentialCache ( Uri uri,
string username,
string password,
string authenticationType )
inlinestatic

Build a CredentialCache with a NetWorkCredential or DefaultCredential depending on the authenticationType string. The username can be a simple name, a domain\username or blank. Blank indicates current credentials should be used. If no domain is entered the current machine default is used.

Parameters
uriThe server to use this credential for
usernameBlank or user name possibly preceded with domain name
passwordPassword
authenticationTypeEither "Basic" or "Negotiate" for Window type login
Returns

◆ BuildNetworkCredential() [1/2]

static NetworkCredential VideoOS.Platform.Login.Util.BuildNetworkCredential ( string userName,
SecureString securePassword,
string authenticationType )
inlinestatic

Build a CredentialCache with a NetWorkCredential or DefaultCredential depending on the authenticationType string.
The username can be a simple name, a domain\username or blank. Blank indicates current credentials should be used.
If no domain is entered the server machine will determine to use either it's domain or local defined user.
Notice that when creating a "Basic" NetworkCredential, it must be added into a CredentialCache before it can be used. The CredentialCache should then be used for adding servers etc.

For authenticationType AuthenticationType.External, null is returned - as NetworkCredential is not used for those users.

Parameters
userNameBlank or user name possibly preceded with domain name
securePasswordPassword
authenticationTypeEither "Basic" or "Negotiate" for Window type login
Returns

◆ BuildNetworkCredential() [2/2]

static NetworkCredential VideoOS.Platform.Login.Util.BuildNetworkCredential ( Uri uri,
string username,
string password,
string authenticationType )
inlinestatic

Build a CredentialCache with a NetWorkCredential or DefaultCredential depending on the authenticationType string.
The username can be a simple name, a domain\username or blank. Blank indicates current credentials should be used.
If no domain is entered the server machine will determine to use either it's domain or local defined user.
Notice that when creating a "Basic" NetworkCredential, it must be added into a CredentialCache before it can be used. The CredentialCache should then be used for adding servers etc.

For authenticationType AuthenticationType.External, null is returned - as NetworkCredential is not used for those users.

Parameters
uriNot used
usernameBlank or user name possibly preceded with domain name
passwordPassword
authenticationTypeEither "Basic" or "Negotiate" for Window type login
Returns

◆ GetCredential()

static NetworkCredential VideoOS.Platform.Login.Util.GetCredential ( ServerId serverId)
inlinestatic

Retrieve relevant Credentials to be used for a given ServerId.

Parameters
serverId
Returns
NetworkCredential or null if the user is using OAuth

◆ GetHostName()

static String VideoOS.Platform.Login.Util.GetHostName ( String mixedUrl)
inlinestatic

Pick out the servername from any Url or address string.

Parameters
mixedUrl
Returns

◆ GetHostNameWithoutDomain()

static String VideoOS.Platform.Login.Util.GetHostNameWithoutDomain ( String mixedUrl)
inlinestatic

Take out any postfix domain names.

Parameters
mixedUrl
Returns

◆ ToSecureString()

static SecureString VideoOS.Platform.Login.Util.ToSecureString ( this string unsecureString)
inlinestatic

Utility method for making a SecureString from a normal string.

Parameters
unsecureString
Returns