VideoOS.Platform.Login.LoginSettings Class Reference

LoginSettings contain a Token of login for one server. It needs to be renewed once in a while. More...

Public Member Functions

void FireRequestNewToken ()
 This method can be called, to ask the MIPSDK to re-login. Only used internally for revovery situations.
 
 LoginSettings (Uri uri, CredentialCache credentialCache, Guid guid, String serverName)
 Store login settings for either Basic or Windows login to a specific server. The Guid is allowed to be updated after construction.
 
 LoginSettings (Uri uri, CredentialCache credentialCache, Guid guid, String serverName, bool secureOnly)
 Store login settings for either Basic or Windows login to a specific server. The Guid is allowed to be updated after construction.
 
 LoginSettings (Uri uri, CredentialCache credentialCache, Guid guid, String serverName, String serverType)
 Store login settings for either Basic or Windows login to a specific server. The Guid is allowed to be updated after construction.
 
 LoginSettings (Uri uri, CredentialCache credentialCache, Guid guid, String serverName, String serverType, bool secureOnly)
 Store login settings for either Basic or Windows login to a specific server. The Guid is allowed to be updated after construction.
 
 LoginSettings (Uri uri, IMipTokenCache identityTokenCache, Guid guid, string serverName, bool secureOnly)
 Create login settings to be used for login to a specific server.
 
 LoginSettings (Uri uri, NetworkCredential networkCredential, Guid guid, String serverName)
 Store login settings for Windows login. Please use the CredentialCache overloaded method when basic authentication is used.
 
 LoginSettings (Uri uri, NetworkCredential networkCredential, Guid guid, String serverName, bool secureOnly)
 Store login settings for Windows login. Please use the CredentialCache overloaded method when basic authentication is used.
 
 LoginSettings (Uri uri, NetworkCredential networkCredential, Guid guid, String serverName, String serverType)
 Store login settings for Windows login. Please use the CredentialCache overloaded method when basic authentication is used.
 
 LoginSettings (Uri uri, NetworkCredential networkCredential, Guid guid, String serverName, String serverType, bool secureOnly)
 Store login settings for Windows login. Please use the CredentialCache overloaded method when basic authentication is used.
 

Static Public Member Functions

static LoginSettings GetLoginSettings (ServerId serverId)
 This method will lookup the LoginSettings based on the provided ServerId.
 

Public Attributes

readonly Guid InstanceGuid = Guid.NewGuid()
 Identifies the instance of this one LoginSettings.
 
LoginServerProductInfo ServerProductInfo = new LoginServerProductInfo()
 Contains information about the server, after logon has been performed.
 

Properties

CredentialCache CredentialCache [get, set]
 The Credential cache for all types of authorizations.
 
string FullyQualifiedUserName [get]
 Provides the fully qualified user name as required by certain server requests.
 
string[] GroupMemberShip [get]
 Get all the group ID's that the user is a member of. The Group ID can be both AD-groups, and internally defined groups or roles.
 
Guid Guid [get, set]
 The GUID of the server. Please note that it may not always be filled to start with, as we need to login to the server before the GUID is found.
 
IMipTokenCache IdentityTokenCache [get, set]
 The token cache from IDP server for all types of users.
 
bool IsBasicUser [get]
 Return true if logging in was done as basic authentication.
 
bool IsOAuthConnection [get]
 Returns true if we have established a connection to an OAuth server.
 
bool IsOAuthIdentity [get]
 Returns true if the identity is managed by an identity provider, e.g. not AD or basic user.
 
String Name [get, set]
 A display name for this server, or just the Uri.Host.
 
NetworkCredential NetworkCredential [get, set]
 The credential used when connecting with Windows, WindowsDefault or basic user authorization.
 
bool SecureOnly [get]
 If true, authentication over https is accepted. Can only be used for server versions 2021 R1 or newer. If false, authentication over both http and https is accepted. Can be used for any server version.
 
string ServerType [get, set]
 If the actual server type is known, initializing this field will speed up the login process.
 
string ServerWebType [get, set]
 This field identify if the server is accessed via a ASMX or SVC service.
 
virtual String Token [get, set]
 Hold the current valid token for the connection to a given server.
If this property is blank, then it indicates that it was not possible to get a new token, or the server has rejected any further login.
 
DateTime TokenTimeToLive [get, set]
 Indicates when the token is no longer valid.
May not be supported in all environments, is DateTime.MinValue when not filled.
 
Uri Uri [get, set]
 The URI of the server where this class apply.
 
Uri UriCorporate [get]
 For servers 2021 R1+, returns value of Uri property For servers older than 2021 R1, returns uri with HTTPS prefix for basic users and HTTP prefix for other users.
 
string UserIdentity [get]
 The Identity of the user that has logged in.
The Identity can be a user SID or a GUID if it is a basic user or OAuth user.
 
UserIdentification UserInformation [get]
 Contains more details about the current user. Some of the detailed fields are the same as are available in this class.
 
string UserName [get]
 The display name of the identity logged in, like "John Doe". For the id see UserInformation.AccountName.
 

Events

EventHandler RequestNewTokenEvent
 Used internally to ask MIPSDK to perform a re-login.
 
EventHandler TokenChangedEvent
 This event is fired whenever the Token has changed. This is used for active sessions that needs to be updated on the fly, this event can be used to re-pass on the token as it is renewed.
 

Detailed Description

LoginSettings contain a Token of login for one server. It needs to be renewed once in a while.

Constructor & Destructor Documentation

◆ LoginSettings() [1/9]

VideoOS.Platform.Login.LoginSettings.LoginSettings ( Uri uri,
CredentialCache credentialCache,
Guid guid,
String serverName )
inline

Store login settings for either Basic or Windows login to a specific server. The Guid is allowed to be updated after construction.

Parameters
uri
credentialCache
guid
serverName

◆ LoginSettings() [2/9]

VideoOS.Platform.Login.LoginSettings.LoginSettings ( Uri uri,
CredentialCache credentialCache,
Guid guid,
String serverName,
String serverType )
inline

Store login settings for either Basic or Windows login to a specific server. The Guid is allowed to be updated after construction.

Parameters
uri
credentialCache
guid
serverName
serverType

◆ LoginSettings() [3/9]

VideoOS.Platform.Login.LoginSettings.LoginSettings ( Uri uri,
NetworkCredential networkCredential,
Guid guid,
String serverName )
inline

Store login settings for Windows login. Please use the CredentialCache overloaded method when basic authentication is used.

Parameters
uri
networkCredential
guid
serverName

◆ LoginSettings() [4/9]

VideoOS.Platform.Login.LoginSettings.LoginSettings ( Uri uri,
NetworkCredential networkCredential,
Guid guid,
String serverName,
String serverType )
inline

Store login settings for Windows login. Please use the CredentialCache overloaded method when basic authentication is used.

Parameters
uri
networkCredential
guid
serverName
serverType

◆ LoginSettings() [5/9]

VideoOS.Platform.Login.LoginSettings.LoginSettings ( Uri uri,
CredentialCache credentialCache,
Guid guid,
String serverName,
bool secureOnly )
inline

Store login settings for either Basic or Windows login to a specific server. The Guid is allowed to be updated after construction.

Parameters
uriThe URI of the server where this class apply
credentialCacheThe Credential cache for all types of authorizations
guidThe GUID of the server
serverNameA display name for this server, or just the Uri.Host
secureOnlyIf true, only authentication over https is accepted. Can only be used for server versions 2021 R1 or newer. If false, authentication over both http and https is accepted. Can be used for any server version.

◆ LoginSettings() [6/9]

VideoOS.Platform.Login.LoginSettings.LoginSettings ( Uri uri,
CredentialCache credentialCache,
Guid guid,
String serverName,
String serverType,
bool secureOnly )
inline

Store login settings for either Basic or Windows login to a specific server. The Guid is allowed to be updated after construction.

Parameters
uriThe URI of the server where this class apply
credentialCacheThe Credential cache for all types of authorizations
guidThe GUID of the server
serverNameA display name for this server, or just the Uri.Host
serverTypeIf the actual server type is known, initializing this field will speed up the login process
secureOnlyIf true, only authentication over https is accepted. Can only be used for server versions 2021 R1 or newer. If false, authentication over both http and https is accepted. Can be used for any server version.

◆ LoginSettings() [7/9]

VideoOS.Platform.Login.LoginSettings.LoginSettings ( Uri uri,
IMipTokenCache identityTokenCache,
Guid guid,
string serverName,
bool secureOnly )
inline

Create login settings to be used for login to a specific server.

Parameters
uriThe URI of the server where this class apply
identityTokenCacheThe token cache from IDP server for all types of users
guidThe GUID of the server
serverNameA display name for this server, or just the Uri.Host
secureOnlyIf true, only authentication over https is accepted. Can only be used for server versions 2021 R1 or newer. If false, authentication over both http and https is accepted. Can be used for any server version.
Exceptions
ArgumentMIPExceptionThrown when uri scheme is not https and secureOnly is set to true

◆ LoginSettings() [8/9]

VideoOS.Platform.Login.LoginSettings.LoginSettings ( Uri uri,
NetworkCredential networkCredential,
Guid guid,
String serverName,
bool secureOnly )
inline

Store login settings for Windows login. Please use the CredentialCache overloaded method when basic authentication is used.

Parameters
uriThe URI of the server where this class apply
networkCredentialThe credential used when connecting with Windows or WindowsDefault authorization
guidThe GUID of the server
serverNameA display name for this server, or just the Uri.Host
secureOnlyIf true, only authentication over https is accepted. Can only be used for server versions 2021 R1 or newer. If false, authentication over both http and https is accepted. Can be used for any server version.

◆ LoginSettings() [9/9]

VideoOS.Platform.Login.LoginSettings.LoginSettings ( Uri uri,
NetworkCredential networkCredential,
Guid guid,
String serverName,
String serverType,
bool secureOnly )
inline

Store login settings for Windows login. Please use the CredentialCache overloaded method when basic authentication is used.

Parameters
uriThe URI of the server where this class apply
networkCredentialThe credential used when connecting with Windows or WindowsDefault authorization
guidThe GUID of the server
serverNameA display name for this server, or just the Uri.Host
serverTypeIf the actual server type is known, initializing this field will speed up the login process
secureOnlyIf true, only authentication over https is accepted. Can only be used for server versions 2021 R1 or newer. If false, authentication over both http and https is accepted. Can be used for any server version.

Member Function Documentation

◆ FireRequestNewToken()

void VideoOS.Platform.Login.LoginSettings.FireRequestNewToken ( )
inline

This method can be called, to ask the MIPSDK to re-login. Only used internally for revovery situations.

◆ GetLoginSettings()

static LoginSettings VideoOS.Platform.Login.LoginSettings.GetLoginSettings ( ServerId serverId)
inlinestatic

This method will lookup the LoginSettings based on the provided ServerId.

Parameters
serverId
Exceptions
ArgumentExceptionIf the LoginSettings could not be found.
Returns

Member Data Documentation

◆ InstanceGuid

readonly Guid VideoOS.Platform.Login.LoginSettings.InstanceGuid = Guid.NewGuid()

Identifies the instance of this one LoginSettings.

◆ ServerProductInfo

LoginServerProductInfo VideoOS.Platform.Login.LoginSettings.ServerProductInfo = new LoginServerProductInfo()

Contains information about the server, after logon has been performed.

Property Documentation

◆ CredentialCache

CredentialCache VideoOS.Platform.Login.LoginSettings.CredentialCache
getset

The Credential cache for all types of authorizations.

◆ FullyQualifiedUserName

string VideoOS.Platform.Login.LoginSettings.FullyQualifiedUserName
get

Provides the fully qualified user name as required by certain server requests.

For AD users: domain\accountname
For Basic users: [BASIC]\accountname
For Oauth users: accountname
For 3rd party identity provider users: [BASIC]\accountname

◆ GroupMemberShip

string [] VideoOS.Platform.Login.LoginSettings.GroupMemberShip
get

Get all the group ID's that the user is a member of. The Group ID can be both AD-groups, and internally defined groups or roles.

◆ Guid

Guid VideoOS.Platform.Login.LoginSettings.Guid
getset

The GUID of the server. Please note that it may not always be filled to start with, as we need to login to the server before the GUID is found.

◆ IdentityTokenCache

IMipTokenCache VideoOS.Platform.Login.LoginSettings.IdentityTokenCache
getset

The token cache from IDP server for all types of users.

◆ IsBasicUser

bool VideoOS.Platform.Login.LoginSettings.IsBasicUser
get

Return true if logging in was done as basic authentication.

◆ IsOAuthConnection

bool VideoOS.Platform.Login.LoginSettings.IsOAuthConnection
get

Returns true if we have established a connection to an OAuth server.

◆ IsOAuthIdentity

bool VideoOS.Platform.Login.LoginSettings.IsOAuthIdentity
get

Returns true if the identity is managed by an identity provider, e.g. not AD or basic user.

◆ Name

String VideoOS.Platform.Login.LoginSettings.Name
getset

A display name for this server, or just the Uri.Host.

◆ NetworkCredential

NetworkCredential VideoOS.Platform.Login.LoginSettings.NetworkCredential
getset

The credential used when connecting with Windows, WindowsDefault or basic user authorization.

◆ SecureOnly

bool VideoOS.Platform.Login.LoginSettings.SecureOnly
get

If true, authentication over https is accepted. Can only be used for server versions 2021 R1 or newer. If false, authentication over both http and https is accepted. Can be used for any server version.

◆ ServerType

string VideoOS.Platform.Login.LoginSettings.ServerType
getset

If the actual server type is known, initializing this field will speed up the login process.

◆ ServerWebType

string VideoOS.Platform.Login.LoginSettings.ServerWebType
getset

This field identify if the server is accessed via a ASMX or SVC service.

When set to blank - the access type is not yet identified.

◆ Token

virtual String VideoOS.Platform.Login.LoginSettings.Token
getset

Hold the current valid token for the connection to a given server.
If this property is blank, then it indicates that it was not possible to get a new token, or the server has rejected any further login.

◆ TokenTimeToLive

DateTime VideoOS.Platform.Login.LoginSettings.TokenTimeToLive
getset

Indicates when the token is no longer valid.
May not be supported in all environments, is DateTime.MinValue when not filled.

◆ Uri

Uri VideoOS.Platform.Login.LoginSettings.Uri
getset

The URI of the server where this class apply.

◆ UriCorporate

Uri VideoOS.Platform.Login.LoginSettings.UriCorporate
get

For servers 2021 R1+, returns value of Uri property For servers older than 2021 R1, returns uri with HTTPS prefix for basic users and HTTP prefix for other users.

◆ UserIdentity

string VideoOS.Platform.Login.LoginSettings.UserIdentity
get

The Identity of the user that has logged in.
The Identity can be a user SID or a GUID if it is a basic user or OAuth user.

◆ UserInformation

UserIdentification VideoOS.Platform.Login.LoginSettings.UserInformation
get

Contains more details about the current user. Some of the detailed fields are the same as are available in this class.

◆ UserName

string VideoOS.Platform.Login.LoginSettings.UserName
get

The display name of the identity logged in, like "John Doe". For the id see UserInformation.AccountName.

Event Documentation

◆ RequestNewTokenEvent

EventHandler VideoOS.Platform.Login.LoginSettings.RequestNewTokenEvent

Used internally to ask MIPSDK to perform a re-login.

◆ TokenChangedEvent

EventHandler VideoOS.Platform.Login.LoginSettings.TokenChangedEvent

This event is fired whenever the Token has changed. This is used for active sessions that needs to be updated on the fly, this event can be used to re-pass on the token as it is renewed.

Note: Use can also register for the LoginTokenChangedIndication for getting same information.