public class Pam extends Object
STDOUT.
This class may be called directly, or by using JAAS, via the JpamLoginModule.| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_SERVICE_NAME
The default service name of "net-sf-pam".
|
| Constructor and Description |
|---|
Pam()
Creates a new Pam object configured to use the
DEFAULT_SERVICE_NAME |
Pam(String serviceName)
Creates a new PAM object configured with the specified service name.
|
| Modifier and Type | Method and Description |
|---|---|
PamReturnValue |
authenticate(String username,
String credentials)
Sames as
authenticateSuccessful, except a PamReturnValue is returned
This method is threadsafe. |
boolean |
authenticateSuccessful(String username,
String credentials)
Authenticates a user.
|
static String |
getLibraryName() |
String |
getServiceName() |
static void |
main(String[] args)
A main method
|
public static final String DEFAULT_SERVICE_NAME
public Pam()
DEFAULT_SERVICE_NAMEpublic Pam(String serviceName) throws NullPointerException, IllegalArgumentException
serviceName - NullPointerExceptionIllegalArgumentExceptionpublic boolean authenticateSuccessful(String username, String credentials)
username - the username to be authenticatedcredentials - the credentials to use in the authentication .e.g a passwordPamReturnValue is PamReturnValue.PAM_SUCCESSpublic PamReturnValue authenticate(String username, String credentials) throws NullPointerException
authenticateSuccessful, except a PamReturnValue is returned
This method is threadsafe.username - credentials - NullPointerException - if any of the parameters are nullauthenticateSuccessful(String, String)public static void main(String[] args)
public static String getLibraryName()
public String getServiceName()
Copyright © 2004-2013. All Rights Reserved.