Skip to content

60East/amps-authentication-csharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

AMPS C# Client Kerberos Authentication

Dependencies

The C# Kerberos authenticator has a single dependency on the NSspi NuGet package.

Example

For Kerberos authentication using C# there is a single module, AMPSKerberosAuthenticator, for authentication on Windows.

using AMPS.Client;
using AMPSKerberos;

class KerberosAuthExample
{
    static void Main(string[] args)
    {
        string username = "username";
        string hostname = "hostname";

        string amps_spn = string.Format("AMPS/{0}", hostname);
        string amps_uri = string.Format("tcp://{0}@{1}:10304/amps/json", username, hostname);

        AMPSKerberosAuthenticator authenticator = new AMPSKerberosAuthenticator(amps_spn);
  
        using (Client client = new Client("KerberosExampleClient"))
        {
            client.connect(amps_uri);
            client.logon(5000, authenticator);
        }
    }
}

See Also

Kerberos Authentication Blog Article libamps_multi_authentication AMPS Server Module

About

CSharp Authentication Auxiliary Code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages