-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d705a9
commit 3f0069b
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# TacacsSharp | ||
A TACACS+ client built on .NET Standard using C#. Based on [this](https://tools.ietf.org/html/draft-ietf-opsawg-tacacs-11) IETF Internet-Draft. | ||
|
||
### Simple Authentication Example | ||
|
||
```C# | ||
// TACACS+ server configuration info | ||
string serverIP = "192.168.18.19"; | ||
int serverPort = 49; | ||
string sharedKey = "test"; | ||
|
||
// User info | ||
string username = "tacacsSharp"; | ||
string password = "changeme@123"; | ||
string remoteAddress = "192.168.18.3"; // user IP address | ||
string port = "vty0"; // user port | ||
// Create the client | ||
var client = new TacacsSharpClient(serverIP, serverPort, sharedKey); | ||
|
||
// Authenticates an user using ASCII method | ||
if(client.AuthenticateAscii(username, password, remoteAddress, port) == AuthenticationStatus.PASS) | ||
{ | ||
Console.WriteLine("May the force be with you..."); | ||
} | ||
else | ||
{ | ||
Console.WriteLinte("YOU SHALL NOT PASS!"); | ||
} | ||
``` | ||
|
||
### Functions Supported | ||
- Version 1.0 | ||
- Synchronous and Asynchronous authentication |