-
Notifications
You must be signed in to change notification settings - Fork 2
Authentication
OTF takes the idea of Authentication adapters from Zend Framework, but solidifies this into using the view which changes options based on the type of adapter.
Authentication adapters allow the developer to define an authentication scheme for the application. To be made available, they must be added to the tbl_ot_auth_adapter
table, then enabled via the Authentication Adapters interface (http://path-to-otf-app.com/ot/auth).
Local
This uses a db table tbl_account
to store usernames and passwords. Out of the box, an OTF instance has the local auth adapter registered and enabled. The base username and password is "admin/admin".
Facebook Authentication via Facebook account
Google Authentication via Google account
Twitter Authentication via Twitter account
Wrap Authentication via WRAP, an NC State-specific authentication protocol. Read more at http://ncsu.edu/wrap.
Yahoo Authentication via Yahoo account
#Writing Your Own
Auth adapters must implement Ot_Auth_Adapter_Interface
as well as Zend_Auth_Adapter_Interface
. An application can have multiple authentication adapters that can authenticate users through a single interface.
Several options must be set in the Auth Adapter to satisfy the interface.
autoLogin (bool) Tells the host application if the adapter can autoLogin or not. This is used on authentication schemes where a user may have already authenticated via shared auth services and you want to look for things like environment variables or cookies.
autoLogout (void) The method is called before the users internal application tokens are destroyed. Implement things in this method that should also be destroyed when the user is logged out.
manageLocally (bool) This flag determines whether or not the authentication adapter manages its username and password information locally to the app or not.
allowUserSignUp (bool) This flag allows users to signup for the service.