-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathValidate.aspx.cs
More file actions
26 lines (25 loc) · 769 Bytes
/
Validate.aspx.cs
File metadata and controls
26 lines (25 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;
namespace AuthenticatorAPI
{
public partial class Validate : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
var pin = Request.QueryString["Pin"];
var secretCode = Request.QueryString["SecretCode"];
if (string.IsNullOrEmpty(pin))
{
Response.Write("Pass 'Pin' in QueryString");
return;
}
if (string.IsNullOrEmpty(secretCode))
{
Response.Write("Pass 'SecretCode' in QueryString");
return;
}
var api = new AuthenticatorAPI();
var ok = api.ValidatePin(pin, secretCode);
Response.Write(ok);
}
}
}