public interface User extends Role
Userrole managed by a User Admin service.
In this context, the term "user" is not limited to just human beings. Instead, it refers to any entity that may have any number of credentials associated with it that it may use to authenticate itself.
User objects are associated with a specific User Admin
service (namely the one that created them), and cannot be used with other
User Admin services.
User object may have credentials (and properties, inherited from
Role class) associated with it. Specific
UserAdminPermission objects are required to read or change a
User object's credentials.
Dictionary objects and have semantics that are
similar to the properties in the
GROUP, ROLE, USER, USER_ANYONE
|Modifier and Type||Method and Description|
Checks to see if this
getName, getProperties, getType
Dictionaryof the credentials of this
Userobject. Any changes to the returned
Dictionaryobject will change the credentials of this
Userobject. This will cause a
UserAdminEventobject of type
UserAdminEvent.ROLE_CHANGEDto be broadcast to any
Only objects of type
String may be used as credential keys, and
only objects of type
String or of type
byte may be used
as credential values. Any other types will cause an exception of type
IllegalArgumentException to be raised.
In order to retrieve a credential from the returned
UserAdminPermission named after the credential name (or
a prefix of it) with action
getCredential is required.
In order to add or remove a credential from the returned
Dictionary object, a
UserAdminPermission named after the
credential name (or a prefix of it) with action
Dictionaryobject containing the credentials of this
boolean hasCredential(java.lang.String key, java.lang.Object value)
Userobject has a credential with the specified
keyset to the specified
If the specified credential
value is not of type
byte, it is ignored, that is,
false is returned (as
opposed to an
IllegalArgumentException being raised).
key- The credential
value- The credential
trueif this user has the specified credential;
java.lang.SecurityException- If a security manager exists and the caller does not have the
UserAdminPermissionnamed after the credential key (or a prefix of it) with action
Copyright © OSGi Alliance (2000, 2018). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0