C# 클래스 GSF.Communication.Radius.RadiusClient

Represents a RADIUS communication client.
상속: IDisposable
파일 보기 프로젝트 열기: GridProtectionAlliance/gsf

공개 메소드들

메소드 설명
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