C# Класс Opc.Ua.UserIdentity

A generic user identity class.
Наследование: IUserIdentity
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetIdentityToken ( ) : UserIdentityToken
GetSecurityToken ( ) : System.IdentityModel.Tokens.SecurityToken
LogonUser ( System.IdentityModel.Tokens.UserNameSecurityToken identityToken, bool interactive ) : ImpersonationContext

Returns the windows principal associated with a user name security token.

UserIdentity ( ) : System

Initializes the object as an anonymous user.

UserIdentity ( CertificateIdentifier certificateId ) : System

Initializes the object with an X509 certificate identifier

UserIdentity ( IssuedIdentityToken token, System.IdentityModel.Selectors.SecurityTokenSerializer serializer, System.IdentityModel.Selectors.SecurityTokenResolver resolver ) : System

Initializes the object with a UA identity token.

UserIdentity ( System.IdentityModel.Tokens.SecurityToken token ) : System

Initializes the object with a .NET security token

UserIdentity ( UserIdentityToken token ) : System

Initializes the object with a UA identity token.

UserIdentity ( X509Certificate2 certificate ) : System

Initializes the object with an X509 certificate

UserIdentity ( string username, string password ) : System

Initializes the object with a username and password.

VerifyPassword ( System.IdentityModel.Tokens.UserNameSecurityToken identityToken ) : void

Verifies that the security token is a valid windows user.

Приватные методы

Метод Описание
Initialize ( CertificateIdentifier certificateId ) : void

Initializes the object with an X509 certificate identifier

Initialize ( IssuedIdentityToken token, System.IdentityModel.Selectors.SecurityTokenSerializer serializer, System.IdentityModel.Selectors.SecurityTokenResolver resolver ) : void

Initializes the object with a UA identity token

Initialize ( System.IdentityModel.Tokens.SecurityToken token ) : void

Initializes the object with a .NET security token

Initialize ( UserIdentityToken token ) : void

Initializes the object with a UA identity token

Initialize ( X509Certificate2 certificate ) : void

Initializes the object with an X509 certificate

Initialize ( string username, string password ) : void

Initializes the object with a username and password.

Описание методов

GetIdentityToken() публичный Метод

public GetIdentityToken ( ) : UserIdentityToken
Результат UserIdentityToken

GetSecurityToken() публичный Метод

public GetSecurityToken ( ) : System.IdentityModel.Tokens.SecurityToken
Результат System.IdentityModel.Tokens.SecurityToken

LogonUser() публичный статический Метод

Returns the windows principal associated with a user name security token.
public static LogonUser ( System.IdentityModel.Tokens.UserNameSecurityToken identityToken, bool interactive ) : ImpersonationContext
identityToken System.IdentityModel.Tokens.UserNameSecurityToken The identity token.
interactive bool Whether to logon interactively (slow).
Результат ImpersonationContext

UserIdentity() публичный Метод

Initializes the object as an anonymous user.
public UserIdentity ( ) : System
Результат System

UserIdentity() публичный Метод

Initializes the object with an X509 certificate identifier
public UserIdentity ( CertificateIdentifier certificateId ) : System
certificateId CertificateIdentifier The certificate identifier.
Результат System

UserIdentity() публичный Метод

Initializes the object with a UA identity token.
public UserIdentity ( IssuedIdentityToken token, System.IdentityModel.Selectors.SecurityTokenSerializer serializer, System.IdentityModel.Selectors.SecurityTokenResolver resolver ) : System
token IssuedIdentityToken The token.
serializer System.IdentityModel.Selectors.SecurityTokenSerializer The token serializer.
resolver System.IdentityModel.Selectors.SecurityTokenResolver The token resolver.
Результат System

UserIdentity() публичный Метод

Initializes the object with a .NET security token
public UserIdentity ( System.IdentityModel.Tokens.SecurityToken token ) : System
token System.IdentityModel.Tokens.SecurityToken The security token.
Результат System

UserIdentity() публичный Метод

Initializes the object with a UA identity token.
public UserIdentity ( UserIdentityToken token ) : System
token UserIdentityToken The user identity token.
Результат System

UserIdentity() публичный Метод

Initializes the object with an X509 certificate
public UserIdentity ( X509Certificate2 certificate ) : System
certificate System.Security.Cryptography.X509Certificates.X509Certificate2 The X509 certificate.
Результат System

UserIdentity() публичный Метод

Initializes the object with a username and password.
public UserIdentity ( string username, string password ) : System
username string The user name.
password string The password.
Результат System

VerifyPassword() публичный статический Метод

Verifies that the security token is a valid windows user.
public static VerifyPassword ( System.IdentityModel.Tokens.UserNameSecurityToken identityToken ) : void
identityToken System.IdentityModel.Tokens.UserNameSecurityToken The security token.
Результат void