public class AAAAdaptor extends ActAAAService.Base
ActAAAService.Base<USER_TYPE>userDao, userType| Constructor and Description |
|---|
AAAAdaptor(Class userType,
boolean passwordTypeIsCharArray,
Method passwordVerifier,
Method roleProviderMethod,
Method permissionProviderMethod,
Method privilegeProviderMethod) |
| Modifier and Type | Method and Description |
|---|---|
protected Set<String> |
permissionsOf(Object user)
Returns direct permission names of specified user
|
protected Integer |
privilegeOf(Object user)
Returns the privilege level of a user.
|
protected Set<String> |
rolesOf(Object user)
Returns role names of specified user
|
protected boolean |
verifyPassword(Object user,
char[] password)
Sub class must overwrite this method to implement password verification logic.
|
authenticate, authenticate, findByName, findUser, findUser, initUserDao, initUserType, nameOf, principalOf, removeAllPrincipals, save, setPrincipalProperties, userKey, username, usernameFieldprotected boolean verifyPassword(Object user, char[] password)
ActAAAService.BaseSub class must overwrite this method to implement password verification logic.
Normally it should be something like:
return Act.crypto().verifyPassword(password, user.getPassword());
verifyPassword in class ActAAAService.Baseuser - the user instancepassword - password suppliedtrue if password matches or false otherwiseprotected Set<String> rolesOf(Object user)
ActAAAService.BaseReturns role names of specified user
If not overwritten by sub class, this method returns an empty set
rolesOf in class ActAAAService.Baseuser - the user instanceprotected Set<String> permissionsOf(Object user)
ActAAAService.BaseReturns direct permission names of specified user
If not overwritten by sub class, this method returns an empty set. If sub class overwrite this method, it shall not return permissions inferred by roles
permissionsOf in class ActAAAService.Baseuser - the user instanceprotected Integer privilegeOf(Object user)
ActAAAService.BaseReturns the privilege level of a user.
If not overwritten by sub class, this method will return null, meaning there is no privilege granted to the user
privilegeOf in class ActAAAService.Baseuser - the user instanceCopyright © 2015–2019 ActFramework. All rights reserved.