About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
legacy:vufind_1.x_developer_manual:building_an_authentication_handler

This is an old revision of the document!


Building an Authentication Handler

This page refers to VuFind 1.x architecture. For VuFind 2.x notes, see the VuFind 2.x docs.

VuFind contains a class-based mechanism for authenticating users.

Architecture

All of VuFind's authentication code can be found in the web/sys/authn directory.

All authentication handlers implement the Authentication interface found in web/sys/authn/Interface.php.

Authentication handlers are instantiated by the AuthenticationFactory class found in web/sys/authn/AuthenticationFactory.php.

Building an Authentication Handler

  • Create a new module in web/sys/authn for your new authentication method.
  • Write a class in this new file that implements the Authentication interface.
  • Modify the AuthenticationFactory class so that it knows how to construct your new class. Starting with VuFind 1.1, this will be unnecessary as long as you name your class according to this pattern: [config.ini value]Authentication; i.e. MyNewAuthentication will load automatically if you use “MyNew” as the value in config.ini.

Notes

  • As of this writing, the web/sys/authn directory contains some utility code (configuration parsers, exception classes) that should probably be moved to a more generic location in the future. If you add new support classes, please consider putting them somewhere more appropriate.
legacy/vufind_1.x_developer_manual/building_an_authentication_handler.1449690832.txt.gz · Last modified: 2015/12/09 19:53 by demiankatz