There are two different types of remote authentication. It is controlled by the KB_AUTH_TYPE constant:
- Adding/refreshing remote user data to KBPublisher and authenticate user.
- Authentication by existing KBPublisher user.
Adding/refreshing remote user data to KB and authenticate user
KB_AUTH_TYPE = 1
On success, the authentication function remoteDoAuth should return an associative array with the following keys:
- first_name
- last_name
- email
- username
- password-- as the user types when they login, that is, not encrypted
- remote_user_id -- a unique userID stored in your system
- role_id - (optional)
- priv_id - (optional) privilege for user. If user has a privilege, he will have access to Admin Area
Authentication by existing KBPublisher user
KB_AUTH_TYPE = 2
On success, the authentication function remoteDoAuth should return.
- the user_id of the user in the KBPublisher USER table (kbp_user)
OR
- Associative array with keys (user_id, username), for example: array('user_id'=>7, 'username'=>'Test').
There are also other configuration variables