C# Класс GSF.Communication.Radius.RadiusClient

Represents a RADIUS communication client.
Наследование: IDisposable
Показать файл Открыть проект

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

Метод Описание
Authenticate ( string username, string password ) : RadiusPacket

Authenticates the username and password against the RADIUS server.

The type of response packet (if any) will be one of the following: AccessAccept: If the authentication is successful. AccessReject: If the authentication is not successful. AccessChallenge: If the server need more information from the user.

When an AccessChallenge response packet is received from the server, it contains a State attribute that must be included in the AccessRequest packet that is being sent in response to the AccessChallenge response. So if this method returns an AccessChallenge packet, then this method is to be called again with the requested information (from ReplyMessage attribute) in the password field and the value State attribute.

Authenticate ( string username, string password, byte state ) : RadiusPacket

Authenticates the username and password against the RADIUS server.

The type of response packet (if any) will be one of the following: AccessAccept: If the authentication is successful. AccessReject: If the authentication is not successful. AccessChallenge: If the server need more information from the user.

When an AccessChallenge response packet is received from the server, it contains a State attribute that must be included in the AccessRequest packet that is being sent in response to the AccessChallenge response. So if this method returns an AccessChallenge packet, then this method is to be called again with the requested information (from ReplyMessage attribute) in the password field and the value State attribute.

CreateNewPin ( string username, string token, string pin ) : bool

Create a new pin for the user.

NOTE: This method is specific to RSA RADIUS implementation.

Dispose ( ) : void

Releases the used resources.

IsUserInNewPinMode ( RadiusPacket response ) : bool

Determines whether or not the response indicates that the user account is in "New Pin" mode.

A user's account can be in the "New Pin" mode when set on the server.

NOTE: This method is specific to RSA RADIUS implementation.

IsUserInNextTokenMode ( RadiusPacket response ) : bool

Determines whether or not the response indicates that the user account is in "Next Token" mode.

A user's account can enter the "Next Token" mode after the user enters incorrect passwords for a few times (3 times by default) and then enters the correct password. Note that repeatedly entering incorrect passwords will disable the user account.

NOTE: This method is specific to RSA RADIUS implementation.

ProcessRequest ( RadiusPacket request ) : RadiusPacket

Send a request to the server and waits for a response back.

RadiusClient ( string serverName, int serverPort, string sharedSecret ) : System

Creates an instance of RADIUS client for sending request to a RADIUS server.

RadiusClient ( string serverName, string sharedSecret ) : System

Creates an instance of RADIUS client for sending request to a RADIUS server.

Защищенные методы

Метод Описание
CheckDisposed ( ) : void

Helper method to check whether or not the object instance has been disposed.

This method is to be called before performing any operation.

Dispose ( bool disposing ) : void

Releases the used resources.

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

Метод Описание
m_udpClient_ReceivedData ( object sender, int>.EventArgs e ) : void

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

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

Authenticates the username and password against the RADIUS server.

The type of response packet (if any) will be one of the following: AccessAccept: If the authentication is successful. AccessReject: If the authentication is not successful. AccessChallenge: If the server need more information from the user.

When an AccessChallenge response packet is received from the server, it contains a State attribute that must be included in the AccessRequest packet that is being sent in response to the AccessChallenge response. So if this method returns an AccessChallenge packet, then this method is to be called again with the requested information (from ReplyMessage attribute) in the password field and the value State attribute.

public Authenticate ( string username, string password ) : RadiusPacket
username string Username to be authenticated.
password string Password to be authenticated.
Результат RadiusPacket

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

Authenticates the username and password against the RADIUS server.

The type of response packet (if any) will be one of the following: AccessAccept: If the authentication is successful. AccessReject: If the authentication is not successful. AccessChallenge: If the server need more information from the user.

When an AccessChallenge response packet is received from the server, it contains a State attribute that must be included in the AccessRequest packet that is being sent in response to the AccessChallenge response. So if this method returns an AccessChallenge packet, then this method is to be called again with the requested information (from ReplyMessage attribute) in the password field and the value State attribute.

public Authenticate ( string username, string password, byte state ) : RadiusPacket
username string Username to be authenticated.
password string Password to be authenticated.
state byte State value from a previous challenge response.
Результат RadiusPacket

CheckDisposed() защищенный Метод

Helper method to check whether or not the object instance has been disposed.
This method is to be called before performing any operation.
protected CheckDisposed ( ) : void
Результат void

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

Create a new pin for the user.
NOTE: This method is specific to RSA RADIUS implementation.
public CreateNewPin ( string username, string token, string pin ) : bool
username string Name of the user.
token string Current token of the user.
pin string New pin of the user.
Результат bool

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

Releases the used resources.
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

Releases the used resources.
protected Dispose ( bool disposing ) : void
disposing bool
Результат void

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

Determines whether or not the response indicates that the user account is in "New Pin" mode.

A user's account can be in the "New Pin" mode when set on the server.

NOTE: This method is specific to RSA RADIUS implementation.

public IsUserInNewPinMode ( RadiusPacket response ) : bool
response RadiusPacket Response packet sent by the server.
Результат bool

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

Determines whether or not the response indicates that the user account is in "Next Token" mode.

A user's account can enter the "Next Token" mode after the user enters incorrect passwords for a few times (3 times by default) and then enters the correct password. Note that repeatedly entering incorrect passwords will disable the user account.

NOTE: This method is specific to RSA RADIUS implementation.

public IsUserInNextTokenMode ( RadiusPacket response ) : bool
response RadiusPacket Response packet sent by the server.
Результат bool

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

Send a request to the server and waits for a response back.
public ProcessRequest ( RadiusPacket request ) : RadiusPacket
request RadiusPacket Request to be sent to the server.
Результат RadiusPacket

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

Creates an instance of RADIUS client for sending request to a RADIUS server.
public RadiusClient ( string serverName, int serverPort, string sharedSecret ) : System
serverName string Name or address of the RADIUS server.
serverPort int Port number of the RADIUS server.
sharedSecret string Shared secret used for encryption and authentication.
Результат System

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

Creates an instance of RADIUS client for sending request to a RADIUS server.
public RadiusClient ( string serverName, string sharedSecret ) : System
serverName string Name or address of the RADIUS server.
sharedSecret string Shared secret used for encryption and authentication.
Результат System