-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
pair.aspx.cs
29 lines (28 loc) · 987 Bytes
/
pair.aspx.cs
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
27
28
29
using System;
namespace AuthenticatorAPI
{
public partial class pair : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
var appName = Request.QueryString["AppName"];
var appInfo = Request.QueryString["AppInfo"];
var secretCode = Request.QueryString["SecretCode"];
if (string.IsNullOrEmpty(appName)) {
Response.Write("Pass 'AppName' in QueryString");
return;
}
if (string.IsNullOrEmpty(appInfo)) {
Response.Write("Pass 'AppInfo' in QueryString");
return;
}
if (string.IsNullOrEmpty(secretCode)) {
Response.Write("Pass 'SecretCode' in QueryString");
return;
}
var api = new AuthenticatorAPI();
var setup = api.Pair(appName, appInfo, secretCode);
Response.Write(setup.Html);
}
}
}