From a522f9d982367183e4a931dd24b32929f018b2fa Mon Sep 17 00:00:00 2001 From: Jim Norman Date: Wed, 29 Nov 2006 10:54:55 +0000 Subject: [PATCH] Add ObtainAuthTokenAsString API to C# interface --- .../csharp-api/Novell.Casa.Authtoken/Authtoken.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CASA-auth-token/client/csharp-api/Novell.Casa.Authtoken/Authtoken.cs b/CASA-auth-token/client/csharp-api/Novell.Casa.Authtoken/Authtoken.cs index 561486e4..b71ea0d5 100644 --- a/CASA-auth-token/client/csharp-api/Novell.Casa.Authtoken/Authtoken.cs +++ b/CASA-auth-token/client/csharp-api/Novell.Casa.Authtoken/Authtoken.cs @@ -75,6 +75,19 @@ namespace Novell.Casa.Client.Auth { } + public static string ObtainAuthTokenAsString(string sService, string sHost) + { + byte[] baToken; + baToken = ObtainAuthToken(sService, sHost, null); + if (baToken != null) + { + return (Encoding.ASCII.GetString(baToken)); + } + else + { + return null; + } + } public static byte[] ObtainAuthToken(string sService, string sHost) {