C# Class GSF.Communication.Radius.RadiusClient

Represents a RADIUS communication client.
Inheritance: IDisposable
Afficher le fichier Open project: GridProtectionAlliance/gsf

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
m_udpClient_ReceivedData ( object sender, int>.EventArgs e ) : void

Method Details

Authenticate() public méthode

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.
Résultat RadiusPacket

Authenticate() public méthode

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.
Résultat RadiusPacket

CheckDisposed() protected méthode

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
Résultat void

CreateNewPin() public méthode

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.
Résultat bool

Dispose() public méthode

Releases the used resources.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

Releases the used resources.
protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

IsUserInNewPinMode() public méthode

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.
Résultat bool

IsUserInNextTokenMode() public méthode

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.
Résultat bool

ProcessRequest() public méthode

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.
Résultat RadiusPacket

RadiusClient() public méthode

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.
Résultat System

RadiusClient() public méthode

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.
Résultat System