Modified the folder name to follow the convention being followed for
test application folder names in the project.
This commit is contained in:
46
CASA-auth-token/non-java/client/csharp/test/Class1.cs
Normal file
46
CASA-auth-token/non-java/client/csharp/test/Class1.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using Novell.Casa.Client.Auth;
|
||||
|
||||
namespace TestClientAuth
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Class1.
|
||||
/// </summary>
|
||||
class Class1
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
if (args.Length < 1)
|
||||
{
|
||||
Console.WriteLine("Usage: TestClientAuth [server]");
|
||||
Console.WriteLine("Press enter to continue");
|
||||
Console.ReadLine();
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
byte[] baToken = Authtoken.ObtainAuthToken("testService", args[0]);
|
||||
Console.WriteLine("Token returned:");
|
||||
for (int i=0; i<baToken.Length; i++)
|
||||
{
|
||||
Console.Write(baToken[i].ToString());
|
||||
}
|
||||
Console.WriteLine("");
|
||||
Console.WriteLine("Press enter to continue");
|
||||
Console.ReadLine();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e.ToString());
|
||||
Console.WriteLine("");
|
||||
Console.WriteLine("Press enter to continue");
|
||||
Console.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user