aerogear-security 1.1.2

org.jboss.aerogear.security.authz
Interface IdentityManagement<T>


public interface IdentityManagement<T>

IdentityManagement allows to assign a set of roles to User on Identity Manager provider


Nested Class Summary
static interface IdentityManagement.GrantMethods<T>
          GrantMethods is a builder to apply roles to User
 
Method Summary
 void create(T user, String password)
          This method creates a new User
 List<T> findAllByRole(String roleName)
          Get All the users
 T findById(long id)
          Find an User by the id specified
 T findByUsername(String username)
          Find an User by the username specified
 String getLogin()
           
 String getSecret()
           
 IdentityManagement.GrantMethods grant(String... roles)
          This method allows to specify which roles must be assigned to User
 boolean hasRoles(Set<String> roles)
           
 void remove(String username)
          Remove an User
 void reset(T user, String currentPassword, String newPassword)
          Reset user' password
 IdentityManagement.GrantMethods revoke(String... roles)
          This method allows to revoke which roles must be revoked to User
 

Method Detail

grant

IdentityManagement.GrantMethods grant(String... roles)
This method allows to specify which roles must be assigned to User

Parameters:
roles - A list of roles.
Returns:
IdentityManagement.GrantMethods is a builder which a allows to apply a list of roles to the specified User.

revoke

IdentityManagement.GrantMethods revoke(String... roles)
This method allows to revoke which roles must be revoked to User

Parameters:
roles - A list of roles.
Returns:
IdentityManagement.GrantMethods is a builder which a allows to apply a list of roles to the specified User.

reset

void reset(T user,
           String currentPassword,
           String newPassword)
Reset user' password

Parameters:
user - User credential
currentPassword - current password already registered
newPassword - new password
Throws:
Exception

findByUsername

T findByUsername(String username)
                 throws RuntimeException
Find an User by the username specified

Parameters:
username -
Returns:
where the generic type represents a User into the system
Throws:
RuntimeException

findById

T findById(long id)
           throws RuntimeException
Find an User by the id specified

Parameters:
id -
Returns:
where the generic type represents a User into the system
Throws:
RuntimeException

remove

void remove(String username)
Remove an User

Parameters:
username -

findAllByRole

List<T> findAllByRole(String roleName)
Get All the users

Parameters:
roleName -
Returns:
Users by roles

create

void create(T user,
            String password)
This method creates a new User

Parameters:
user - where the generic type represents a User into the system
password - input provided by User

getSecret

String getSecret()

getLogin

String getLogin()

hasRoles

boolean hasRoles(Set<String> roles)

aerogear-security 1.1.2

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.