Class AbstractCredentials
java.lang.Object
org.apache.jackrabbit.oak.spi.security.authentication.credentials.AbstractCredentials
- All Implemented Interfaces:
Serializable
,Credentials
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable Object
getAttribute
(@NotNull String name) Returns the value of the named attribute as anObject
, ornull
if no attribute of the given name exists.@NotNull String
Returns the userId.void
removeAttribute
(@NotNull String name) Removes an attribute from this credentials instance.void
setAttribute
(@NotNull String name, @Nullable Object value) Stores an attribute in this credentials instance.void
setAttributes
(@NotNull Map<String, Object> attributes) Stores the attributes in this credentials instance.
-
Field Details
-
attributes
-
userId
-
-
Constructor Details
-
AbstractCredentials
-
-
Method Details
-
getUserId
Returns the userId.- Returns:
- the userId.
-
setAttribute
Stores an attribute in this credentials instance. If the specifiedvalue
isnull
the attribute will be removed.- Parameters:
name
- aString
specifying the name of the attributevalue
- theObject
to be stored
-
getAttribute
Returns the value of the named attribute as anObject
, ornull
if no attribute of the given name exists.- Parameters:
name
- aString
specifying the name of the attribute- Returns:
- an
Object
containing the value of the attribute, ornull
if the attribute does not exist
-
removeAttribute
Removes an attribute from this credentials instance.- Parameters:
name
- aString
specifying the name of the attribute to remove
-
getAttributes
- Returns:
- an immutable map containing the attributes available to this credentials instance
-
setAttributes
Stores the attributes in this credentials instance.- Parameters:
attributes
- The attributes to be stored
-