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
TokenEnhancer
and 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 boolean
canEqual(Object other)
boolean
equals(Object o)
Map<String,Object>
getPayload()
The values to add to theUser's
attributes.String
getUserId()
The id of the user to add additional attributes.int
hashCode()
void
setPayload(Map<String,Object> payload)
The values to add to theUser's
attributes.void
setUserId(String userId)
The id of the user to add additional attributes.String
toString()
-
-
-
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's
attributes.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
TokenEnhancer
must be implemented.- Returns:
- the values to add into the
User's
attributes - 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's
attributes.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
TokenEnhancer
must be implemented.- Parameters:
payload
- the values to add to theUser's
attributes- See Also:
User.getAttributes()
-
canEqual
protected boolean canEqual(Object other)
-
-