2014-01-08 14:16:39 +00:00
|
|
|
namespace AsterNET.Manager.Action
|
2013-01-18 15:55:50 +00:00
|
|
|
{
|
2015-01-03 15:37:29 +00:00
|
|
|
/// <summary>
|
|
|
|
/// The ChallengeAction requests a challenge from the server to use when logging
|
|
|
|
/// in using challenge/response. Sending this action to the asterisk server
|
|
|
|
/// results in a ChallengeResponse being received from the server.
|
|
|
|
/// </summary>
|
|
|
|
/// <seealso cref="Manager.Action.LoginAction" />
|
|
|
|
/// <seealso cref="Manager.Response.ChallengeResponse" />
|
|
|
|
public class ChallengeAction : ManagerAction
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Creates a new empty ChallengeAction with MD5 algorithm
|
|
|
|
/// </summary>
|
|
|
|
public ChallengeAction()
|
|
|
|
{
|
|
|
|
AuthType = "MD5";
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Creates a new ChallengeAction that requests a new login challenge for use
|
|
|
|
/// with the given digest algorithm.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="authType">the digest alogrithm to use.</param>
|
|
|
|
public ChallengeAction(string authType)
|
|
|
|
{
|
|
|
|
AuthType = authType;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Get the name of this action, i.e. "Challenge".
|
|
|
|
/// </summary>
|
|
|
|
public override string Action
|
|
|
|
{
|
|
|
|
get { return "Challenge"; }
|
|
|
|
}
|
2013-01-18 15:55:50 +00:00
|
|
|
|
2015-01-03 15:37:29 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Get/Set the digest alogrithm to use. Currently asterisk only supports "MD5".
|
|
|
|
/// </summary>
|
|
|
|
public string AuthType { get; set; }
|
|
|
|
}
|
2013-01-18 15:55:50 +00:00
|
|
|
}
|