|
OSGi™ Service Platform Release 2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A User role 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.
In general, Userobjects are associated with a specific User Admin service (namely the one that created them), and cannot be used with other User Admin services.
A Userobject may have credentials (and properties, inherited from the Role
class)
associated with it. Specific UserAdminPermission
objects are required to
read or change a User object's credentials.
Credentials are Dictionary objects and have semantics that are similar to the properties in the Role class.
Field Summary |
Fields inherited from interface org.osgi.service.useradmin.Role |
GROUP, ROLE, USER |
Method Summary | |
java.util.Dictionary |
getCredentials()
Returns a Dictionary of the credentials of this User object. |
boolean |
hasCredential(java.lang.String key,
java.lang.Object value)
Checks to see if this User object has a credential with the specified key set to the specified value. |
Methods inherited from interface org.osgi.service.useradmin.Role |
getName, getProperties, getType |
Method Detail |
public java.util.Dictionary getCredentials()
UserAdminEvent.ROLE_CHANGED
to be broadcast to any
UserAdminListeners objects.
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 Dictionary object,
a 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 changeCredential
is required.
public boolean hasCredential(java.lang.String key, java.lang.Object value)
If the specified credential value is not of type String or byte[], it is ignored, that is, false is returned (as opposed to an IllegalArgumentException being raised).
key
- The credential key.value
- The credential value.
java.lang.SecurityException
- If a security manager exists and the caller
does not have the UserAdminPermission named after the credential
key (or a prefix of it) with action getCredential.
|
OSGi™ Service Platform Release 2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |