Package org.apache.karaf.jaas.modules
Interface BackingEngine
-
- All Known Implementing Classes:
JDBCBackingEngine,LDAPBackingEngine,PropertiesBackingEngine,PublickeyBackingEngine,SyncopeBackingEngine
public interface BackingEngine
-
-
Field Summary
Fields Modifier and Type Field Description static StringGROUP_PREFIX
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddGroup(String username, String group)Add a user into a given group.voidaddGroupRole(String group, String role)Add a role in a group.voidaddRole(String username, String role)Add a role to the user.voidaddUser(String username, String password)Create a new user.voidcreateGroup(String group)Create a groupvoiddeleteGroup(String username, String group)Remove a user from a group.voiddeleteGroupRole(String group, String role)Remove a role from a group.voiddeleteRole(String username, String role)Remove a role from a user.voiddeleteUser(String username)Delete an user.Map<org.apache.karaf.jaas.boot.principal.GroupPrincipal,String>listGroups()List all groups.List<org.apache.karaf.jaas.boot.principal.GroupPrincipal>listGroups(org.apache.karaf.jaas.boot.principal.UserPrincipal user)List groups that a user is member of.List<org.apache.karaf.jaas.boot.principal.RolePrincipal>listRoles(Principal principal)List Roles forprincipal.List<org.apache.karaf.jaas.boot.principal.UserPrincipal>listUsers()List all users.org.apache.karaf.jaas.boot.principal.UserPrincipallookupUser(String username)Retrieve theUserPrincipalcorresponding to an username, ornullif user doesn't exist.
-
-
-
Field Detail
-
GROUP_PREFIX
static final String GROUP_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
addUser
void addUser(String username, String password)
Create a new user.- Parameters:
username- the user name.password- the user password.
-
deleteUser
void deleteUser(String username)
Delete an user.- Parameters:
username- the user name.
-
listUsers
List<org.apache.karaf.jaas.boot.principal.UserPrincipal> listUsers()
List all users.- Returns:
- the list of
UserPrincipal.
-
lookupUser
org.apache.karaf.jaas.boot.principal.UserPrincipal lookupUser(String username)
Retrieve theUserPrincipalcorresponding to an username, ornullif user doesn't exist.- Parameters:
username- The username.- Returns:
- The
UserPrincipalornull.
-
listGroups
List<org.apache.karaf.jaas.boot.principal.GroupPrincipal> listGroups(org.apache.karaf.jaas.boot.principal.UserPrincipal user)
List groups that a user is member of.- Parameters:
user- theUserPrincipal.- Returns:
- the list of
GroupPrincipal.
-
listGroups
Map<org.apache.karaf.jaas.boot.principal.GroupPrincipal,String> listGroups()
List all groups.- Returns:
- the groups.
-
addGroup
void addGroup(String username, String group)
Add a user into a given group.- Parameters:
username- the user name.group- the group.
-
createGroup
void createGroup(String group)
Create a group- Parameters:
group- the group.
-
deleteGroup
void deleteGroup(String username, String group)
Remove a user from a group.- Parameters:
username- the user name.group- the group.
-
listRoles
List<org.apache.karaf.jaas.boot.principal.RolePrincipal> listRoles(Principal principal)
List Roles forprincipal. This could either be aUserPrincipalor aGroupPrincipal.- Parameters:
principal- the principal.- Returns:
- the list of roles.
-
addRole
void addRole(String username, String role)
Add a role to the user.- Parameters:
username- the user name.role- the role.
-
deleteRole
void deleteRole(String username, String role)
Remove a role from a user.- Parameters:
username- the user name.role- the role.
-
addGroupRole
void addGroupRole(String group, String role)
Add a role in a group.- Parameters:
group- the group.role- the role.
-
-