# OpcServerIdentity Class

<dl class="api-definition">
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.server">Opc.UaFx.Server</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
<dt>Members</dt>
<dd><a href="./members">OpcServerIdentity Members</a></dd>
</dl>

Represents the identity of a user of the server, which is identified by a user name and a password.

## Syntax

<div class="api-signature" data-lang="csharp">

```csharp
public class OpcServerIdentity : OpcUserIdentity
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Class OpcServerIdentity
    Inherits OpcUserIdentity
```

</div>

## Inheritance

[Object](https://learn.microsoft.com/dotnet/api/system.object) → [OpcIdentity](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcidentity/) → [OpcUserIdentity](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcuseridentity/) → **OpcServerIdentity**

## Constructors

| Name | Description |
|---|---|
| [OpcServerIdentity](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserveridentity/members#opcserveridentity)<span class="api-meta">3 overloads</span> | Initializes a new instance of the OpcServerIdentity class using the `userName` specified and an empty password. |

## Properties

| Name | Description |
|---|---|
| [DisplayName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserveridentity/members#displayname)<span class="api-meta">override</span> | Gets the name displayed for the identity. |
| [UserName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserveridentity/members#username) | Gets the name of the user. |

## Methods

| Name | Description |
|---|---|
| [ChangePassword](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserveridentity/members#changepassword)<span class="api-meta">2 overloads</span> | Changes the password of the identity to the `password` specified. |
| [Impersonate](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserveridentity/members#impersonate)<span class="api-meta">override</span> | Returns an impersonation context for the identity. |
| [Matches](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserveridentity/members#matches)<span class="api-meta">virtual · since v2.7</span> | Determines whether the `userName` and `password` specified match the identity. |
| [TransformPassword](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserveridentity/members#transformpassword)<span class="api-meta">protected · virtual · since v2.7</span> | Transforms the `password` specified into the bytes stored and compared by the identity. |

Inherits members from [OpcUserIdentity](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcuseridentity/members), [OpcIdentity](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcidentity/members).

## Applies to

| Package | Versions |
|---|---|
| Opc.UaFx.Advanced | v2.5–v2.59 |
