Class SyncopeBackingEngine
- java.lang.Object
-
- org.apache.karaf.jaas.modules.syncope.SyncopeBackingEngine
-
- All Implemented Interfaces:
BackingEngine
public class SyncopeBackingEngine extends Object implements BackingEngine
-
-
Field Summary
-
Fields inherited from interface org.apache.karaf.jaas.modules.BackingEngine
GROUP_PREFIX
-
-
Constructor Summary
Constructors Constructor Description SyncopeBackingEngine(String address, String version, String adminUser, String adminPassword)
-
Method Summary
All Methods Instance Methods Concrete 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 principal)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.
-
-
-
Method Detail
-
addUser
public void addUser(String username, String password)
Description copied from interface:BackingEngineCreate a new user.- Specified by:
addUserin interfaceBackingEngine- Parameters:
username- the user name.password- the user password.
-
deleteUser
public void deleteUser(String username)
Description copied from interface:BackingEngineDelete an user.- Specified by:
deleteUserin interfaceBackingEngine- Parameters:
username- the user name.
-
listUsers
public List<org.apache.karaf.jaas.boot.principal.UserPrincipal> listUsers()
Description copied from interface:BackingEngineList all users.- Specified by:
listUsersin interfaceBackingEngine- Returns:
- the list of
UserPrincipal.
-
lookupUser
public org.apache.karaf.jaas.boot.principal.UserPrincipal lookupUser(String username)
Description copied from interface:BackingEngineRetrieve theUserPrincipalcorresponding to an username, ornullif user doesn't exist.- Specified by:
lookupUserin interfaceBackingEngine- Parameters:
username- The username.- Returns:
- The
UserPrincipalornull.
-
listRoles
public List<org.apache.karaf.jaas.boot.principal.RolePrincipal> listRoles(Principal principal)
Description copied from interface:BackingEngineList Roles forprincipal. This could either be aUserPrincipalor aGroupPrincipal.- Specified by:
listRolesin interfaceBackingEngine- Parameters:
principal- the principal.- Returns:
- the list of roles.
-
addRole
public void addRole(String username, String role)
Description copied from interface:BackingEngineAdd a role to the user.- Specified by:
addRolein interfaceBackingEngine- Parameters:
username- the user name.role- the role.
-
deleteRole
public void deleteRole(String username, String role)
Description copied from interface:BackingEngineRemove a role from a user.- Specified by:
deleteRolein interfaceBackingEngine- Parameters:
username- the user name.role- the role.
-
listGroups
public List<org.apache.karaf.jaas.boot.principal.GroupPrincipal> listGroups(org.apache.karaf.jaas.boot.principal.UserPrincipal principal)
Description copied from interface:BackingEngineList groups that a user is member of.- Specified by:
listGroupsin interfaceBackingEngine- Parameters:
principal- theUserPrincipal.- Returns:
- the list of
GroupPrincipal.
-
addGroup
public void addGroup(String username, String group)
Description copied from interface:BackingEngineAdd a user into a given group.- Specified by:
addGroupin interfaceBackingEngine- Parameters:
username- the user name.group- the group.
-
deleteGroup
public void deleteGroup(String username, String group)
Description copied from interface:BackingEngineRemove a user from a group.- Specified by:
deleteGroupin interfaceBackingEngine- Parameters:
username- the user name.group- the group.
-
addGroupRole
public void addGroupRole(String group, String role)
Description copied from interface:BackingEngineAdd a role in a group.- Specified by:
addGroupRolein interfaceBackingEngine- Parameters:
group- the group.role- the role.
-
deleteGroupRole
public void deleteGroupRole(String group, String role)
Description copied from interface:BackingEngineRemove a role from a group.- Specified by:
deleteGroupRolein interfaceBackingEngine- Parameters:
group- the group.role- the role.
-
listGroups
public Map<org.apache.karaf.jaas.boot.principal.GroupPrincipal,String> listGroups()
Description copied from interface:BackingEngineList all groups.- Specified by:
listGroupsin interfaceBackingEngine- Returns:
- the groups.
-
createGroup
public void createGroup(String group)
Description copied from interface:BackingEngineCreate a group- Specified by:
createGroupin interfaceBackingEngine- Parameters:
group- the group.
-
-