Sometimes you are providing password-protected content to people outside of the USD community. You can create your own list of usernames and passwords for such pages.
Instead of “require_once('/web/includes/sso_portal.phpi')” use “require_once('/web/includes/sso_custom.phpi')”.
You must have a file of usernames and passwords. This file is the same format as the files htpasswd creates; if you have such a file, you can use it.
<? require_once('/web/includes/sso_custom.phpi'); $sso->users('/path/to/users.txt'); $sso->authenticate(); ?>
Like your group file (if you have one), this should not be in a public place. Create a special folder in your home directory to store files such as this.
By default, the scope of the single sign-on environment is limited to the directory that this file is in. If you need it to have a wider scope, specify the scope with $sso->scope('/path/to/parent/') before you authenticate. For example:
<? require_once('/web/includes/sso_custom.phpi'); $sso->users('/Users/webac/web/users.txt'); $sso->scope('/webdev/'); $sso->authenticate(); ?>
Your user file can also contain an e-mail address as a third field. Note that the htpasswd command will erase any data beyond two fields per entry, so don’t use htpasswd once you add an e-mail address.
If you add an e-mail address, this will be returned by the $sso->email() method.
The easiest way to create a password to a file is with:
/usr/local/bin/webpassword --file <filename> <username> [<email address>]
/usr/local/bin/webpassword --file users.txt jerry
It will ask you for the password to store in the file.
Use /usr/local/bin/webpassword --help for more options. After you change a password, you should test it on your web pages.
If your web page is on home.sandiego.edu, you cannot use sso_custom. You must use sso_www. If you need the functionality of sso_custom, send an email to the webmaster describing how you intend to use it.
Information Technology Services
University Center 117
5998 Alcalá Park
San Diego, CA 92110
Phone: (619) 260-7900
Help Desk at University Center 117
- Monday - Thursday: 7 a.m. - 7 p.m.
- Friday: 7 a.m. - 5 p.m.
- Saturday & Sunday - CLOSED
- Monday - Friday: 8 a.m. - 7 p.m.
- Saturday - 9 a.m. - 4 p.m.
- Sunday - CLOSED