C# Class Opc.Ua.UserIdentity

A generic user identity class.
Inheritance: IUserIdentity
ファイルを表示 Open project: OPCFoundation/UA-.NET Class Usage Examples

Public Methods

Method Description
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.

Private Methods

Method Description
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.

Method Details

GetIdentityToken() public method

public GetIdentityToken ( ) : UserIdentityToken
return UserIdentityToken

GetSecurityToken() public method

public GetSecurityToken ( ) : System.IdentityModel.Tokens.SecurityToken
return System.IdentityModel.Tokens.SecurityToken

LogonUser() public static method

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).
return ImpersonationContext

UserIdentity() public method

Initializes the object as an anonymous user.
public UserIdentity ( ) : System
return System

UserIdentity() public method

Initializes the object with an X509 certificate identifier
public UserIdentity ( CertificateIdentifier certificateId ) : System
certificateId CertificateIdentifier The certificate identifier.
return System

UserIdentity() public method

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.
return System

UserIdentity() public method

Initializes the object with a .NET security token
public UserIdentity ( System.IdentityModel.Tokens.SecurityToken token ) : System
token System.IdentityModel.Tokens.SecurityToken The security token.
return System

UserIdentity() public method

Initializes the object with a UA identity token.
public UserIdentity ( UserIdentityToken token ) : System
token UserIdentityToken The user identity token.
return System

UserIdentity() public method

Initializes the object with an X509 certificate
public UserIdentity ( X509Certificate2 certificate ) : System
certificate System.Security.Cryptography.X509Certificates.X509Certificate2 The X509 certificate.
return System

UserIdentity() public method

Initializes the object with a username and password.
public UserIdentity ( string username, string password ) : System
username string The user name.
password string The password.
return System

VerifyPassword() public static method

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.
return void