Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Seam Core JSF2 2.3.0.Final
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.seam.security.management
Interface IdentityStore

All Known Implementing Classes:
  JpaIdentityStore, LdapIdentityStore

    public interface IdentityStore

The identity store does the actual work of persisting user accounts in a database, LDAP directory, etc.

Author:
  Shane Bryzak

Nested Class Summary
`static class` | `IdentityStore.Feature`
`static class` | `IdentityStore.FeatureSet` Represents a set of optional features that an IdentityStore implementation might support.

Method Summary
`boolean` | `addRoleToGroup(String role, String group)` Adds the specified role as a member of the specified group.
`boolean` | `authenticate(String username, String password)` Authenticates the specified user, using the specified password.
`boolean` | `changePassword(String name, String password)` Changes the password of the specified user to the specified password.
`boolean` | `createRole(String role)` Creates a new role with the specified role name.
`boolean` | `createUser(String username, String password)` Creates a new user with the specified username and password.
`boolean` | `createUser(String username, String password, String firstname, String lastname)` Creates a new user with the specified username, password, first name and last name.
`boolean` | `deleteRole(String role)` Deletes the specified role.
`boolean` | `deleteUser(String name)` Deletes the user with the specified username.
`boolean` | `disableUser(String name)` Disables the user with the specified username.
`boolean` | `enableUser(String name)` Enables the user with the specified username.
`List<String>` | `getGrantedRoles(String name)` Returns a list of all the roles explicitly granted to the specified user.
`List<String>` | `getImpliedRoles(String name)` Returns a list of all roles that the specified user is a member of.
`List<String>` | `getRoleGroups(String name)` Returns a list of all the groups that the specified role is a member of.
`boolean` | `grantRole(String name, String role)` Grants the specified role to the specified user.
`boolean` | `isUserEnabled(String name)` Returns true if the specified user is enabled.
`List<String>` | `listGrantableRoles()` Returns a list of roles that can be granted (i.e, excluding conditional roles)
`List<Principal>` | `listMembers(String role)` Lists the members of the specified role.
`List<String>` | `listRoles()` Returns a list of all the roles.
`List<String>` | `listUsers()` Returns a list of all users.
`List<String>` | `listUsers(String filter)` Returns a list of all users containing the specified filter text within their username.
`boolean` | `removeRoleFromGroup(String role, String group)` Removes the specified role from the specified group.
`boolean` | `revokeRole(String name, String role)` Revokes the specified role from the specified user.
`boolean` | `roleExists(String name)` Returns true if the specified role exists.
`boolean` | `supportsFeature(IdentityStore.Feature feature)` Returns true if the IdentityStore implementation supports the specified feature.
`boolean` | `userExists(String name)` Returns true if the specified user exists.

Method Detail

### supportsFeature

    boolean supportsFeature(IdentityStore.Feature feature)

  Returns true if the IdentityStore implementation supports the specified feature.

### createUser

    boolean createUser(String username,
                       String password)

  Creates a new user with the specified username and password.

  Returns:
    true if the user was successfully created.

### createUser

    boolean createUser(String username,
                       String password,
                       String firstname,
                       String lastname)

  Creates a new user with the specified username, password, first name and last name.

  Returns:
    true if the user was successfully created.

### deleteUser

    boolean deleteUser(String name)

  Deletes the user with the specified username.

  Returns:
    true if the user was successfully deleted.

### enableUser

    boolean enableUser(String name)

  Enables the user with the specified username. Enabled users are able to authenticate.

  Returns:
    true if the specified user was successfully enabled.

### disableUser

    boolean disableUser(String name)

  Disables the user with the specified username. Disabled users are unable to authenticate.

  Returns:
    true if the specified user was successfully disabled.

### isUserEnabled

    boolean isUserEnabled(String name)

  Returns true if the specified user is enabled.

### changePassword

    boolean changePassword(String name,
                           String password)

  Changes the password of the specified user to the specified password.

  Returns:
    true if the user's password was successfully changed.

### userExists

    boolean userExists(String name)

  Returns true if the specified user exists.

### createRole

    boolean createRole(String role)

  Creates a new role with the specified role name.

  Returns:
    true if the role was created successfully.

### grantRole

    boolean grantRole(String name,
                      String role)

  Grants the specified role to the specified user.

  Parameters:
    `name` - The name of the user
    `role` - The name of the role to grant to the user.
  Returns:
    true if the role was successfully granted.

### revokeRole

    boolean revokeRole(String name,
                       String role)

  Revokes the specified role from the specified user.

  Parameters:
    `name` - The name of the user
    `role` - The name of the role to grant to the user.
  Returns:
    true if the role was successfully revoked.

### deleteRole

    boolean deleteRole(String role)

  Deletes the specified role.

  Returns:
    true if the role was successfully deleted.

### roleExists

    boolean roleExists(String name)

  Returns true if the specified role exists.

### addRoleToGroup

    boolean addRoleToGroup(String role,
                           String group)

  Adds the specified role as a member of the specified group.

  Parameters:
    `role` - The name of the role to add as a member
    `group` - The name of the group that the specified role will be added to.
  Returns:
    true if the role was successfully added to the group.

### removeRoleFromGroup

    boolean removeRoleFromGroup(String role,
                                String group)

  Removes the specified role from the specified group.

  Parameters:
    `role` - The name of the role to remove from the group.
    `group` - The group from which to remove the role.
  Returns:
    true if the role was successfully removed from the group.

### listUsers

    List<String> listUsers()

  Returns a list of all users.

### listUsers

    List<String> listUsers(String filter)

  Returns a list of all users containing the specified filter text within their username.

### listRoles

    List<String> listRoles()

  Returns a list of all the roles.

### listGrantableRoles

    List<String> listGrantableRoles()

  Returns a list of roles that can be granted (i.e, excluding conditional roles)

### getGrantedRoles

    List<String> getGrantedRoles(String name)

  Returns a list of all the roles explicitly granted to the specified user.

### getImpliedRoles

    List<String> getImpliedRoles(String name)

  Returns a list of all roles that the specified user is a member of. This list may contain roles that may not have been explicitly granted to the user, which are indirectly implied due to group memberships.

### getRoleGroups

    List<String> getRoleGroups(String name)

  Returns a list of all the groups that the specified role is a member of.

### listMembers

    List<Principal> listMembers(String role)

  Lists the members of the specified role.

### authenticate

    boolean authenticate(String username,
                         String password)

  Authenticates the specified user, using the specified password.

  Returns:
    true if authentication is successful.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Seam Core JSF2 2.3.0.Final
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 Seam Framework. All Rights Reserved.