Installation and Usage
Last updated
Was this helpful?
Was this helpful?
interface name="SessionStorageInterface" { // or "RequestStorageInterface"
public any function getVar( required string name, any defaultValue );
public void function setVar( required string name, required any value );
public boolean function deleteVar( required string name );
public boolean function exists( required string name );
}interface {
/**
* Verify if the incoming username/password are valid credentials.
*
* @username The username
* @password The password
*/
boolean function isValidCredentials( required username, required password );
/**
* Retrieve a user by username
*
* @return User that implements IAuthUser
*/
function retrieveUserByUsername( required username );
/**
* Retrieve a user by unique identifier
*
* @id The unique identifier
*
* @return User that implements IAuthUser
*/
function retrieveUserById( required id );
}interface {
/**
* Return the unique identifier for the user
*/
function getId();
}property name="auth" inject="authenticationService@cbauth";
// OR
var auth = wirebox.getInstance( "authenticationService@cbauth" );auth.authenticate( username, password );
auth.isLoggedIn();
auth.getUser();
auth.logout();