Skip to content

jamac/yourls-cas-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

yourls-cas-auth

A rudimentary YOURLS plugin to enable Central Authentication Service for user authentication.

Installation

  1. Extract the latest release of phpCAS to a location php can access.
  2. In user/plugins create a new folder named cas-auth.
  3. Extract the latest release of yourls-cas-auth to that folder.
  4. Provide connection details and a user white list to user/config.php. (details below)
  5. Go to your Plugins administration page and activate the CAS Authentication plugin

Usage

When enabled and configured properly this plugin will essentially hijack YOURLS default handling of login/logout, redirecting such requests to your CAS server.

Configuration

Required

At minimum you must define the following:

  • CASAUTH_CAS_PATH The path to where you extracted phpCAS.

    This should be an absolute path, though there is a weak attempt at accepting a relative path.

  • CASAUTH_CAS_HOST The hostname of your CAS server.

    eg cas.server.com

  • CASAUTH_CAS_URI The URI your CAS server is responding on.

    eg /cas

Optional

Additionally you may also define the following:

  • CASAUTH_CAS_VERSION The version of your CAS server.

    Defaults to CAS_VERSION_2_0 as defined by phpCAS

  • CASAUTH_CAS_PORT The port your CAS server is running on.

    Defaults to 443

  • CASAUTH_CAS_CACERT The PEM certificate file name of the CA that emited the cert of the server.

    You should set this, otherwise the plugin will attempt to connect to CAS with out server validation.

  • $casauth_user_whitelist An array of authenticated usernames permitted to administer the site.

    If omitted or empty all authenticated usernames are permitted to administer the site.

    `$casauth_user_whitelist = array(
        'user-one'
        'user-two'
        ...
    );`
    

Troubleshooting

  1. Double check your configuration in user/config.php.
  2. Run around in a circle while crying "The sky is falling!"
  3. Check the issue queue.

License

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages