This library makes the PAM API available for .NET applications.
The library is released under the .
The following example creates a PAM transaction and tries to authenticate a user.
// Create the servicevarpamService=newPamService(// The service optionsnewOptionsWrapper<PamSessionConfiguration>(newPamSessionConfiguration()));// The PAM message handlervarmessageHandler=newConsoleMessageHandler();// Create a PAM transactionusing(varpamTransaction=pamService.Start(messageHandler)){// Change the user promptpamTransaction.UserPrompt="my customized user login prompt: ";// AuthenticatepamTransaction.Authenticate();// Ensure that the user isn't locked (etc...)pamTransaction.AccountManagement();Console.WriteLine("User authentication for use {0} successful.",pamTransaction.UserName);}- .NET Core 3.0
TL/DR: It makes my life easier.
This library uses the native library loading mechanism of .NET Core 3.0. This is
required when you want to avoid using libdl.so, which is either only available
in a -dev package, has a different name, depending on your operating system or
distribution or other problems.
And no: netstandard2.1 doesn't support this API.