C# Class Quickstarts.UserAuthenticationServer.UserAuthenticationServer

Implements a basic Quickstart Server.
Each server instance must have one instance of a StandardServer object which is responsible for reading the configuration file, creating the endpoints and dispatching incoming requests to the appropriate handler. This sub-class specifies non-configurable metadata such as Product Name and initializes the UserAuthenticationNodeManager which provides access to the data exposed by the Server.
Inheritance: Opc.Ua.Server.StandardServer
Show file Open project: OPCFoundation/UA-.NET

Protected Methods

Method Description
CreateMasterNodeManager ( IServerInternal server, ApplicationConfiguration configuration ) : MasterNodeManager

Creates the node managers for the server.

This method allows the sub-class create any additional node managers which it uses. The SDK always creates a CoreNodeManager which handles the built-in nodes defined by the specification. Any additional NodeManagers are expected to handle application specific nodes.

CreateResourceManager ( IServerInternal server, ApplicationConfiguration configuration ) : ResourceManager

Creates the resource manager for the server.

LoadServerProperties ( ) : ServerProperties

Loads the non-configurable properties for the application.

These properties are exposed by the server but cannot be changed by administrators.

OnRequestComplete ( OperationContext context ) : void

This method is called in a finally block at the end of request processing (i.e. called even on exception).

OnServerStarted ( IServerInternal server ) : void

Called after the server has been started.

OnServerStarting ( ApplicationConfiguration configuration ) : void

Initializes the server before it starts up.

This method is called before any startup processing occurs. The sub-class may update the configuration object or do any other application specific startup tasks.

ValidateRequest ( RequestHeader requestHeader, RequestType requestType ) : OperationContext

This method is called at the being of the thread that processes a request.

Private Methods

Method Description
CreateSecurityTokenResolver ( CertificateIdentifier issuerCertificate ) : System.IdentityModel.Selectors.SecurityTokenResolver

Initializes the validator from the configuration for a token policy.

CreateUserIdentityValidators ( ApplicationConfiguration configuration ) : void

Creates the objects used to validate the user identity tokens supported by the server.

LogonUser ( OperationContext context, System.IdentityModel.Tokens.UserNameSecurityToken securityToken ) : void

Impersonates the windows user identifed by the security token.

ParseAndVerifyKerberosToken ( byte tokenData ) : System.IdentityModel.Tokens.SecurityToken

Validates a Kerberos WSS user token.

SessionManager_ImpersonateUser ( Session session, ImpersonateEventArgs args ) : void

Called when a client tries to change its user identity.

VerifyCertificate ( X509Certificate2 certificate ) : void

Verifies that a certificate user token is trusted.

VerifyPassword ( string userName, string password ) : void

Validates the password for a username token.

Method Details

CreateMasterNodeManager() protected method

Creates the node managers for the server.
This method allows the sub-class create any additional node managers which it uses. The SDK always creates a CoreNodeManager which handles the built-in nodes defined by the specification. Any additional NodeManagers are expected to handle application specific nodes.
protected CreateMasterNodeManager ( IServerInternal server, ApplicationConfiguration configuration ) : MasterNodeManager
server IServerInternal
configuration ApplicationConfiguration
return Opc.Ua.Server.MasterNodeManager

CreateResourceManager() protected method

Creates the resource manager for the server.
protected CreateResourceManager ( IServerInternal server, ApplicationConfiguration configuration ) : ResourceManager
server IServerInternal
configuration ApplicationConfiguration
return Opc.Ua.Server.ResourceManager

LoadServerProperties() protected method

Loads the non-configurable properties for the application.
These properties are exposed by the server but cannot be changed by administrators.
protected LoadServerProperties ( ) : ServerProperties
return Opc.Ua.ServerProperties

OnRequestComplete() protected method

This method is called in a finally block at the end of request processing (i.e. called even on exception).
protected OnRequestComplete ( OperationContext context ) : void
context Opc.Ua.Server.OperationContext
return void

OnServerStarted() protected method

Called after the server has been started.
protected OnServerStarted ( IServerInternal server ) : void
server IServerInternal
return void

OnServerStarting() protected method

Initializes the server before it starts up.
This method is called before any startup processing occurs. The sub-class may update the configuration object or do any other application specific startup tasks.
protected OnServerStarting ( ApplicationConfiguration configuration ) : void
configuration ApplicationConfiguration
return void

ValidateRequest() protected method

This method is called at the being of the thread that processes a request.
protected ValidateRequest ( RequestHeader requestHeader, RequestType requestType ) : OperationContext
requestHeader RequestHeader
requestType RequestType
return Opc.Ua.Server.OperationContext