authenticators.BaseAuthenticator | +--authenticators.DBAuthenticator
Method Summary | |
public any |
init([any firewallInstance])
Initialize the Authenticator on firewall configure. |
package void |
auditUserEvent([string user_id="0"], string event_type, string event_description)
I log a user action |
public boolean |
authenticate(string username, string password)
I authenticate a user credential |
public boolean |
authenticateByToken([string auth_token="#getAuthenticationCookieValue()#"])
|
public boolean |
canEditUsers()
Returns true if this Authenticator supports the methods to edit users and change passwords |
public void |
changePassword(string user_id, string old_password, string new_password, string confirm_password)
Used to change a users password |
package string |
createAuthenticationToken([string user_id], [string password_hash], [string token])
|
package string |
generateForgotPasswordToken([any user_id])
|
public query |
getAllUsers()
Returns a list of all users |
package numeric |
getAuditEventFrequency(string event_type, [string user_id="0"], [string ip_address=""])
returns the number of times the event was logged in the past hour |
public string |
getDescription()
Returns a description of where the data is stored, eg datasource name. |
public query |
getUserByEmail([any email])
Returns user info query by email address |
public query |
getUserByID([any user_id])
|
public boolean |
reAuthorizePassword([string password], [any user_id="#getAuthenticatedUserID()#"])
Allows for reAuthorization via password for sensitive operations. |
public void |
setDatasource(any datasource, [any username=""], [any password=""], [any dbtype=""])
Sets the datasource name. |
public string |
updateUser([string user_id], [struct user])
Updates or creates a user by passing in a struct with keys email, roles, enabled, etc. Performs security checks to make sure the current user may perform this action as well. Returns the user id of the new or existing user. |
package boolean |
verifyForgotPasswordToken([any user_id], [any token])
|
Method Detail |
package void auditUserEvent([string user_id="0"], string event_type, string event_description)
[string user_id="0"]
string event_type
string event_description
public boolean authenticate(string username, string password)
string username
string password
public boolean authenticateByToken([string auth_token="#getAuthenticationCookieValue()#"])
[string auth_token="#getAuthenticationCookieValue()#"]
public boolean canEditUsers()
public void changePassword(string user_id, string old_password, string new_password, string confirm_password)
string user_id
string old_password
string new_password
string confirm_password
package string createAuthenticationToken([string user_id], [string password_hash], [string token])
[string user_id]
[string password_hash]
[string token]
package string generateForgotPasswordToken([any user_id])
[any user_id]
public query getAllUsers()
package numeric getAuditEventFrequency(string event_type, [string user_id="0"], [string ip_address=""])
string event_type
- An event_type of list of event types.[string user_id="0"]
[string ip_address=""]
public string getDescription()
public query getUserByEmail([any email])
[any email]
public query getUserByID([any user_id])
[any user_id]
public any init([any firewallInstance])
[any firewallInstance]
public boolean reAuthorizePassword([string password], [any user_id="#getAuthenticatedUserID()#"])
[string password]
[any user_id="#getAuthenticatedUserID()#"]
public void setDatasource(any datasource, [any username=""], [any password=""], [any dbtype=""])
any datasource
- The name of a valid datasource[any username=""]
- Optional, the datasource username[any password=""]
- Optional, the datasource password[any dbtype=""]
- mysql, sqlserver, or derbypublic string updateUser([string user_id], [struct user])
[string user_id]
[struct user]
package boolean verifyForgotPasswordToken([any user_id], [any token])
[any user_id]
[any token]