Skip to content

Reference

OpcClientIdentity Members

Represents a user identity which is defined by a user name and a password.

Reference

OpcClientIdentity Members ​

Type
OpcClientIdentity
Namespace
Opc.UaFx.Client
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0
Also in
Opc.UaFx.Client

Inherits members from OpcUserIdentity, OpcIdentity.

Constructors ​

OpcClientIdentity ​

Initializes a new instance of the OpcClientIdentity class using the userName and password specified.

csharp
public OpcClientIdentity(string userName, string password)
vbnet
Public Sub New(userName As String, password As String)

Parameters

NameTypeDescription
userNameStringThe name of the user.
passwordStringThe password of the user.

Properties ​

DisplayName ​

override

Gets the name of the identity to display.

csharp
public override string DisplayName { get; }
vbnet
Public Overrides ReadOnly Property DisplayName As String

Property value

String

The UserName of the identity.

Overrides

DisplayName

Password ​

Gets the password of the user.

csharp
public string Password { get; }
vbnet
Public ReadOnly Property Password As String

Property value

String

The password of the user.

UserName ​

Gets the name of the user.

csharp
public string UserName { get; }
vbnet
Public ReadOnly Property UserName As String

Property value

String

The name of the user.

Methods ​

Impersonate ​

override

Returns an impersonation context which does not impersonate the user.

csharp
public override OpcImpersonationContext Impersonate()
vbnet
Public Overrides Function Impersonate() As OpcImpersonationContext

Returns

OpcImpersonationContext

An OpcImpersonationContext whose Undo method does nothing.

Overrides

Impersonate

Matches ​

Determines whether the identity is defined by the userName and password specified.

csharp
public bool Matches(string userName, string password)
vbnet
Public Function Matches(userName As String, password As String) As Boolean

Parameters

NameTypeDescription
userNameStringThe name of the user to compare.
passwordStringThe password of the user to compare.

Returns

Boolean

The value true if the userName and the password are equal to the UserName and the Password of the identity; otherwise the value false.

Exceptions

ExceptionCondition
ArgumentExceptionThe userName is an empty string.
ArgumentNullExceptionThe userName or password is a null reference (Nothing in Visual Basic).