C# Класс Dse.Auth.Sspi.Contexts.ClientContext

Represents a client security context. Provides the means to establish a shared security context with the server and to encrypt, decrypt, sign and verify messages to and from the server.
A client and server establish a shared security context by exchanging authentication tokens. Once the shared context is established, the client and server can pass messages to each other, encrypted, signed, etc, using the established parameters of the shared context.
Наследование: Context
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
ClientContext ( ClientCredential cred, string serverPrinc, ContextAttrib requestedAttribs ) : System

Initializes a new instance of the ClientContext class. The context is not fully initialized and usable until the authentication cycle has been completed.

Init ( byte serverToken, byte &outToken ) : SecurityStatus

Performs and continues the authentication cycle.

This method is performed iteratively to start, continue, and end the authentication cycle with the server. Each stage works by acquiring a token from one side, presenting it to the other side which in turn may generate a new token. The cycle typically starts and ends with the client. On the first invocation on the client, no server token exists, and null is provided in its place. The client returns its status, providing its output token for the server. The server accepts the clients token as input and provides a token as output to send back to the client. This cycle continues until the server and client both indicate, typically, a SecurityStatus of 'OK'.

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

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

Initializes a new instance of the ClientContext class. The context is not fully initialized and usable until the authentication cycle has been completed.
public ClientContext ( ClientCredential cred, string serverPrinc, ContextAttrib requestedAttribs ) : System
cred Dse.Auth.Sspi.Credentials.ClientCredential The security credential to authenticate as.
serverPrinc string The principle name of the server to connect to, or null for any.
requestedAttribs ContextAttrib Requested attributes that describe the desired properties of the /// context once it is established. If a context cannot be established that satisfies the indicated /// properties, the context initialization is aborted.
Результат System

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

Performs and continues the authentication cycle.
This method is performed iteratively to start, continue, and end the authentication cycle with the server. Each stage works by acquiring a token from one side, presenting it to the other side which in turn may generate a new token. The cycle typically starts and ends with the client. On the first invocation on the client, no server token exists, and null is provided in its place. The client returns its status, providing its output token for the server. The server accepts the clients token as input and provides a token as output to send back to the client. This cycle continues until the server and client both indicate, typically, a SecurityStatus of 'OK'.
public Init ( byte serverToken, byte &outToken ) : SecurityStatus
serverToken byte The most recently received token from the server, or null if beginning /// the authentication cycle.
outToken byte The clients next authentication token in the authentication cycle.
Результат SecurityStatus