A utility class to build user CredentialCache and NetworkCredential.
More...
|
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.
|
|
A utility class to build user CredentialCache and NetworkCredential.
◆ 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
-
uri | The server to use this credential for |
userName | Blank or user name possibly preceded with domain name |
securePassword | Password |
authenticationType | Either "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
-
uri | The server to use this credential for |
username | Blank or user name possibly preceded with domain name |
password | Password |
authenticationType | Either "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
-
userName | Blank or user name possibly preceded with domain name |
securePassword | Password |
authenticationType | Either "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
-
uri | Not used |
username | Blank or user name possibly preceded with domain name |
password | Password |
authenticationType | Either "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
-
- 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
-
- Returns
◆ GetHostNameWithoutDomain()
static String VideoOS.Platform.Login.Util.GetHostNameWithoutDomain |
( |
String | mixedUrl | ) |
|
|
inlinestatic |
Take out any postfix domain names.
- Parameters
-
- Returns
◆ ToSecureString()
static SecureString VideoOS.Platform.Login.Util.ToSecureString |
( |
this string | unsecureString | ) |
|
|
inlinestatic |
Utility method for making a SecureString from a normal string.
- Parameters
-
- Returns