public interface User extends Serializable
Represents a user or other actor which may have permissions to do things within the application.
The default implementation within Errai is UserImpl
, but a different implementation may
be used so long as it is Portable
and implements all methods of this interface as
described by the documentation.
Modifier and Type | Interface and Description |
---|---|
static class |
User.StandardUserProperties
A set of standard property names that most other security identity systems
are likely to have information about.
|
Modifier and Type | Field and Description |
---|---|
static User |
ANONYMOUS
Represents a user who is not logged in.
|
Modifier and Type | Method and Description |
---|---|
Set<Group> |
getGroups()
The implementation returned must use the
Object.equals(Object) method for comparison. |
String |
getIdentifier() |
Map<String,String> |
getProperties()
Note: the contents of this map will depend on the implementations of
User and
AuthenticationService being used. |
String |
getProperty(String name) |
Set<Role> |
getRoles()
The implementation returned must use the
Object.equals(Object) method for comparison. |
void |
removeProperty(String name) |
void |
setProperty(String name,
String value) |
static final User ANONYMOUS
single role
.String getIdentifier()
Set<Role> getRoles()
Object.equals(Object)
method for comparison.Roles
associated with this user.Set<Group> getGroups()
Object.equals(Object)
method for comparison.Groups
associated with this user.Map<String,String> getProperties()
User
and
AuthenticationService
being used.void setProperty(String name, String value)
name
- The name of a property to set.value
- The value to set. This will override any pre-existing value.void removeProperty(String name)
name
- The name of a property to remove.String getProperty(String name)
name
- The name of a property to get the value of.null
if there is no such property in the
getProperties()
map.Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.