Class UserAttributesRequest
- java.lang.Object
-
- com.broadleafcommerce.auth.resource.domain.UserAttributesRequest
-
public class UserAttributesRequest extends Object
A request DTO to adjust the attributes on a particularUser.By itself, this request has no affect on a user. It simply persists the user attributes to the database. At that point, it is up to the implementer to handle those attributes.
A common use-case is adding additional claims to a token. To do this, it is required to implement a custom
TokenEnhancerand manually add any claims.
-
-
Constructor Summary
Constructors Constructor Description UserAttributesRequest()UserAttributesRequest(String userId, Map<String,Object> payload)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)Map<String,Object>getPayload()The values to add to theUser'sattributes.StringgetUserId()The id of the user to add additional attributes.inthashCode()voidsetPayload(Map<String,Object> payload)The values to add to theUser'sattributes.voidsetUserId(String userId)The id of the user to add additional attributes.StringtoString()
-
-
-
Method Detail
-
getUserId
public String getUserId()
The id of the user to add additional attributes.- See Also:
User.getId()
-
getPayload
public Map<String,Object> getPayload()
The values to add to theUser'sattributes.This is a key/value pair, and the key(s) should be a unique value. If these attributes are intended to be used as additional claims, a custom
TokenEnhancermust be implemented.- Returns:
- the values to add into the
User'sattributes - See Also:
User.getAttributes()
-
setUserId
public void setUserId(String userId)
The id of the user to add additional attributes.- See Also:
User.getId()
-
setPayload
public void setPayload(Map<String,Object> payload)
The values to add to theUser'sattributes.This is a key/value pair, and the key(s) should be a unique value. If these attributes are intended to be used as additional claims, a custom
TokenEnhancermust be implemented.- Parameters:
payload- the values to add to theUser'sattributes- See Also:
User.getAttributes()
-
canEqual
protected boolean canEqual(Object other)
-
-