system auth
1.0.0A library to authenticate against system user accounts (PAM etc.)
Table of Contents
About system-auth
This library lets you authenticate against accounts that exist on the local system (Linux PAM, Windows NT Accounts).
How To
Most of the time you'll just want to run org.shirakumo.system-auth:login with the username and password that you'd like to check. If successful you'll get a login instance back, and if not an error will be signalled. You can then use that instance to query some extra data via fields or change the password via change-password. Once you are done using the account, call logout again.
You can also try to list the set of known system account names via list-accounts.
Note that, of course, all of these functions are heavily dependent on the current system state and the capabilities of the process running system-auth. Further, there is no standard way to create or remove accounts with this method, or store other kind of application data that you might want to tie to user accounts for your own needs, so you will most likely need to make use of local system administration utilities and out-of-band databases for those remaining bits.
System Information
Definition Index
-
ORG.SHIRAKUMO.SYSTEM-AUTH
No documentation provided.-
EXTERNAL CLASS LOGIN
Representation of a login session. You must call LOGOUT when you are done with the session to free up system resources. See USERNAME See LOGIN See LOGOUT See CHANGE-PASSWORD See FIELD
-
EXTERNAL CONDITION AUTH-ERROR
Error signalled when a request fails. This may be for any number of reasons -- invalid arguments, invalid password, system busy, some internal failure, you name it. See MESSAGE
-
EXTERNAL GENERIC-FUNCTION CHANGE-PASSWORD
- LOGIN
- OLD-PASSWORD
- NEW-PASSWORD
- &KEY
- &ALLOW-OTHER-KEYS
Attempts to change the password/token for the given login. You must supply both the old and the new password again. If the old-password is a STREAM and the new-password is NIL, then three lines will be read from the stream: the old password, the new password, and a repetition of the new password for safety. The stream must be interactive and bidirectional. If successful returns the login. If changing the password fails for some reason, an AUTH-ERROR is signalled. See LOGIN (type)
-
EXTERNAL GENERIC-FUNCTION FIELD
- LOGIN
- FIELD
- &KEY
- DEFAULT
- PASSWORD
- &ALLOW-OTHER-KEYS
Accesses a user account field. Whether you can actually write to any field at all is dependant on the system and the authorisation of the running process. If writing to a field fails, an AUTH-ERROR is signalled. When the field is T, returns a plist of all available fields. The set of available fields is system dependent, but should in the very least include the following: :NAME --- The username :PRIMARY-GROUP-ID --- The ID number of the primary group of the user. :COMMENT --- An arbitrary comment associated with the account. :HOME --- The home directory path of the user. See LOGIN (type) -
EXTERNAL GENERIC-FUNCTION (SETF FIELD)
- VALUE
- LOGIN
- FIELD
- &KEY
- DEFAULT
- PASSWORD
- &ALLOW-OTHER-KEYS
No documentation provided. -
EXTERNAL GENERIC-FUNCTION LIST-ACCOUNTS
- &KEY
Lists all known user account names available on the system. Note that not all accounts on this list may be logged in to, some may be reserved for system service use instead. Some accounts may also be temporarily missing due to network issues or other system related outages. Suffice to say this list is neither static nor necessarily even authoritative. See LOGIN
-
EXTERNAL GENERIC-FUNCTION LOGIN
- LOGIN
- PASSWORD
- &KEY
- CONFDIR
- SERVICE-NAME
- &ALLOW-OTHER-KEYS
Log in to a user account with a token/password. The username should be the name of the account to log in with, and the password either a string for the user account's token/password, or a stream from which the password will be prompted. If successful returns a LOGIN instance that you can use to change the password or query account fields with. You must call LOGOUT when you are done with the session to free up system resources. If logging in fails for some reason, an AUTH-ERROR is signalled. This may either be because there is no account of that name, the password is wrong, or there is a system level failure that prevents the authentication request. Note that the USERNAME of the LOGIN may be different from the username you supplied and will reflect the system canonical username. See LOGIN (type) See LOGOUT
-
EXTERNAL GENERIC-FUNCTION LOGOUT
- LOGIN
Logs out the session and frees up any associated system resources. Safe to call multiple times. See LOGIN See LOGIN (type)
-
EXTERNAL GENERIC-FUNCTION MESSAGE
- CONDITION
The message supplied for the error. May give some idea on what went wrong -- or not! See AUTH-ERROR
-
EXTERNAL GENERIC-FUNCTION USERNAME
- OBJECT
Returns the username of the login. See LOGIN (type)
-
EXTERNAL GENERIC-FUNCTION (SETF USERNAME)
- NEW-VALUE
- OBJECT
No documentation provided.
-