FuseGuard Logo

fuseguard.components.authenticators
Component DBAuthenticator

authenticators.BaseAuthenticator
  |
  +--authenticators.DBAuthenticator

Authenticates against the fuseguard database tables fuseguard_users

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 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
public query getAllUsers()
          Returns a list of all users
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 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.

Methods inherited from authenticators.BaseAuthenticator
changeForgotPassword, getMinimumPasswordLength, getAuthenticationCookieValue, getTokenType, getAuthenticatedUserID, deleteAuthenticationCookie, setIsAuthenticated, isUserAuthenticated, isPasswordValid, authenticateByToken, getHashAlgorithm, setHashAlgorithm, isAuthenticatedUserInRole, logout, setMinimumPasswordLength, getAuthenticatedUserRoles, isAuthenticatedUserAdmin, setAuthenticationCookie, sendForgotPasswordEmail, createAuthenticationToken, generateToken, getAuthenticatedUserToken
 

Method Detail

auditUserEvent

package void auditUserEvent([string user_id="0"], string event_type, string event_description)
I log a user action

Parameters:
[string user_id="0"]
string event_type
string event_description

authenticate

public boolean authenticate(string username, string password)
I authenticate a user credential

Parameters:
string username
string password

canEditUsers

public boolean canEditUsers()
Returns true if this Authenticator supports the methods to edit users and change passwords


changePassword

public void changePassword(string user_id, string old_password, string new_password, string confirm_password)
Used to change a users password

Parameters:
string user_id
string old_password
string new_password
string confirm_password

getAllUsers

public query getAllUsers()
Returns a list of all users


getDescription

public string getDescription()
Returns a description of where the data is stored, eg datasource name.


getUserByEmail

public query getUserByEmail([any email])
Returns user info query by email address

Parameters:
[any email]

getUserByID

public query getUserByID([any user_id])
Parameters:
[any user_id]

init

public any init([any firewallInstance])
Initialize the Authenticator on firewall configure.

Parameters:
[any firewallInstance]

setDatasource

public void setDatasource(any datasource, [any username=""], [any password=""], [any dbtype=""])
Sets the datasource name.

Parameters:
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 derby

updateUser

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.

Parameters:
[string user_id]
[struct user]