c
c
cbAuth
Search…
IAuthUser
You have to create a User component which responds to the getId() method. This user will be retrieved by the retrieve methods from your IUserService
1
interface {
2
3
/**
4
* Return the unique identifier for the user
5
*/
6
function getId();
7
8
/**
9
* Verify if the user has one or more of the passed in permissions
10
*
11
* @permission One or a list of permissions to check for access
12
*
13
*/
14
boolean function hasPermission( required permission );
15
16
/**
17
* Shortcut to verify it the user is logged in or not.
18
*/
19
boolean function isLoggedIn();
20
21
}
Copied!
Combined with cbsecurity or cbguard you might have to specify additional methods for checking roles or permissions.
Last modified 1yr ago
Copy link
Edit on GitHub