Provides the methods you use to access the AS Client API.
public JAscAuth()
The following fields map the AS Client API return codes. For more information about return codes from the AS Client API, see Section C.0, Troubleshooting the API.
public static int AS_OK = 0
public static int AS_NO = 1
public static int AS_NOUSER = 2
public static int AS_NOAGENT = 3
public static int AS_NOSERVER = 3
public static int AS_BADCLIENT = 4
public static int AS_REVOKED = 5
public static int AS_INTRUDER = 6
public static int AS_INVALIDARGS = 7
public static int AS_INVALIDOBJ = 8
public static int AS_INVALIDOBJLEN = 9
public static int AS_PASSDUPLICATE = 10
public static int AS_PASSTOOSHORT = 11
public static int AS_TOOSMALL = 12
public static int AS_ATTRNOTFOUND = 13
public static int AS_WSOCKUP = 14
public static int AS_WSOCKDOWN = 15
public static int AS_NOAUTHENV = 16
public static int AS_PRODUCTEXPIRED = 17
public static int AS_INCLUDED = 18
public static int AS_EXCLUDED = 19
public static int AS_NOMATCH = 20
public static int AS_NOLICENSE = 21
public static int AS_INVALIDREQ = 22
public static int AS_KEYEXPIRED = 23
The following methods invoke the API functions:
Performs an administrative reset of a user's password. The new password is marked as being expired unless it is non-expiring.
You must call the init method to initialize the JAscAuth environment before calling adminResetPassword. For more information about init, see init.
For details about the exceptions that can be thrown, see Exception Classes in com.novell.asam.JAscAuth.
public void adminResetPassword( java.lang.String adminUser, java.lang.String adminPass, java.lang.String user, java.lang.String pass)
Changes the password of a user.
You must call the init method to initialize the JAscAuth environment before calling changePassword. For more information about init, see init.
For details about the exceptions that can be thrown, see Exception Classes in com.novell.asam.JAscAuth.
public void changePassword( String user, String oldPass, String newPass)
Verifies the password of a user.
You must call the init method to initialize the JAscAuth environment before calling checkPassword. For more information about init, see init.
The checkPassword method can optionally return information about the user and password in a JAscUser object. For details about the contents of JAscUser, see Classes Used by checkPassword.
For details about the exceptions that can be thrown, see Exception Classes in com.novell.asam.JAscAuth.
public void checkPassword( String user, String pass)
public void checkPassword( String user, String pass, JAscUser ascuser)
Destroys the JAscAuth environment and frees its underlying resources.
public void destroy()
Checks the effective rights of one object over another for a specific attribute.
You must call the init method to initialize the JAscAuth environment before calling effectiveRights. For more information about init, see init.
For details about the exceptions that can be thrown, see Exception Classes in com.novell.asam.JAscAuth.
public void effectiveRights( String user, String object, String attribute, String rights)
Returns the fully distinguished object name from the Census for a given user.
You must call the init method to initialize the JAscAuth environment before calling getContext. For more information about init, see init.
For details about the exceptions that can be thrown, see Exception Classes in com.novell.asam.JAscAuth.
public String getContext(String user)
Returns the return code from the last call to the AS Client API.
For details about return codes from the AS Client API, see Section C.0, Troubleshooting the API.
public int getLastReturnCode()
Returns an enumeration of all members of a given Group.
You must call the init method to initialize the JAscAuth environment before calling groupMembers. For more information about init, see init.
For details about the exceptions that can be thrown, see Exception Classes in com.novell.asam.JAscAuth.
public Enumeration groupMembers(String group)
Initializes the JAscAuth environment using the platform configuration file.
You can optionally specify the location of the platform configuration file to be used. If you do not specify the location of the platform configuration file, the default platform configuration file is used.
Call the destroy method to free the JAscAuth environment and its underlying resources when you are finished. For more information about destroy, see destroy.
public void init()
public void init(java.lang.String filename)
Returns an enumeration of a given user's security equivalences.
You must call the init method to initialize the JAscAuth environment before calling listSecurityEquivalences. For more information about init, see init.
For details about the exceptions that can be thrown, see Exception Classes in com.novell.asam.JAscAuth.
public Enumeration listSecurityEquivalences(String user)
Returns an enumeration of the values of a specified attribute for a given object.
You must call the init method to initialize the JAscAuth environment before calling readAttribute. For more information about init, see init.
For details about the exceptions that can be thrown, see Exception Classes in com.novell.asam.JAscAuth.
public Enumeration readAttribute( String object, String attribute)
Returns the integer number of days for the given number of seconds.
public long secondsToDays(long secs)
Checks to see if a user has security equivalence to the specified object.
You must call the init method to initialize the JAscAuth environment before calling securityEquals. For more information about init, see init.
For details about the exceptions that can be thrown, see Exception Classes in com.novell.asam.JAscAuth.
public void securityEquals( String user, String object)
Returns the string representation of the given AS Client API return code.
public String strError(int rc)
Determines if a given user matches an AS.USER.INCLUDE or AS.USER.EXCLUDE statement in the platform configuration file.
public int userIncludeExclude(String user)