Class User
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUser()User(String id, String firstName, String middleName, String lastName, String fullName, String username, String email, String phone, String serviceId, String type, String externalId, String tenantId, String customerContextId, Instant lastUpdated, Map<String, Object> attributes, boolean locked, List<AccountRole> accountRoles) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanRoles this user has under specific Account contexts.<T> TgetAttribute(String key) Additional attributes of a user.This field only applies toUserType.CUSTOMERusers.getEmail()The user's email address.Intended to hold any unique identifier for this user as known by an external (non-BLC) system.The first name of the user, if the fullName is not being used for the user.The full name of the user.getId()The last name of the user, if the fullName is not being used for the user.Indicates when this record was last updated.The middle name of the user, if the fullName is not being used for the user.getPhone()The user's phone numberIf the auth service received this user from a BLC service (ex: the admin user service or the customer service), this field will be the ID value used by that service for this user.The id of the tenant this user is associated with.getType()Represents the type of user this is.What this user uses to actually log in.booleanhasAttribute(String key) inthashCode()booleanisLocked()Indicates the user has been locked due to too many failed login attempts.voidsetAccountRoles(List<AccountRole> accountRoles) Roles this user has under specific Account contexts.voidsetAttributes(Map<String, Object> attributes) Additional attributes of a user.voidsetCustomerContextId(String customerContextId) This field only applies toUserType.CUSTOMERusers.voidThe user's email address.voidsetExternalId(String externalId) Intended to hold any unique identifier for this user as known by an external (non-BLC) system.voidsetFirstName(String firstName) The first name of the user, if the fullName is not being used for the user.voidsetFullName(String fullName) The full name of the user.voidvoidsetLastName(String lastName) The last name of the user, if the fullName is not being used for the user.voidsetLastUpdated(Instant lastUpdated) Indicates when this record was last updated.voidsetLocked(boolean locked) Indicates the user has been locked due to too many failed login attempts.voidsetMiddleName(String middleName) The middle name of the user, if the fullName is not being used for the user.voidThe user's phone numbervoidsetServiceId(String serviceId) If the auth service received this user from a BLC service (ex: the admin user service or the customer service), this field will be the ID value used by that service for this user.voidsetTenantId(String tenantId) The id of the tenant this user is associated with.voidRepresents the type of user this is.voidsetUsername(String username) What this user uses to actually log in.toString()
-
Constructor Details
-
User
public User() -
User
public User(String id, String firstName, String middleName, String lastName, String fullName, String username, String email, String phone, @Nullable String serviceId, @Nullable String type, @Nullable String externalId, @Nullable String tenantId, @Nullable String customerContextId, Instant lastUpdated, Map<String, Object> attributes, boolean locked, List<AccountRole> accountRoles)
-
-
Method Details
-
getAttribute
-
hasAttribute
-
getId
-
getFirstName
The first name of the user, if the fullName is not being used for the user.- Returns:
- The first name of the user.
- See Also:
-
getMiddleName
The middle name of the user, if the fullName is not being used for the user.- Returns:
- The middle name of the user.
- See Also:
-
getLastName
The last name of the user, if the fullName is not being used for the user.- Returns:
- The last name of the user.
- See Also:
-
getFullName
The full name of the user.- See Also:
-
getUsername
What this user uses to actually log in. Often the same asemail. -
getEmail
The user's email address. -
getPhone
The user's phone number -
getServiceId
If the auth service received this user from a BLC service (ex: the admin user service or the customer service), this field will be the ID value used by that service for this user.If this value is set, there should also be a value set for
type.Only if both values are non-null, a combination of this field and
typewill be unique across all records in the authentication service. There is no uniqueness guarantee for records which have a null service ID or nulltype.- See Also:
-
type
-
getType
Represents the type of user this is. This value must be supplied ifserviceIdis set.- See Also:
-
serviceIdUserType
-
getExternalId
Intended to hold any unique identifier for this user as known by an external (non-BLC) system. For example, many implementations may integrate or import/export data from other systems that manage their own unique identifiers.- Returns:
- a unique identifier for this user in a non-BLC system
-
getTenantId
The id of the tenant this user is associated with. -
getCustomerContextId
This field only applies toUserType.CUSTOMERusers.The id of the customer context this user is a member of. If this is set, this user is restricted to this customer context.
-
getLastUpdated
Indicates when this record was last updated. -
getAttributes
Additional attributes of a user. All of a User's attributes that are available at the time of registration are available. -
isLocked
public boolean isLocked()Indicates the user has been locked due to too many failed login attempts. -
getAccountRoles
Roles this user has under specific Account contexts. -
setId
-
setFirstName
The first name of the user, if the fullName is not being used for the user.- Parameters:
name- The first name of the user- See Also:
-
setMiddleName
The middle name of the user, if the fullName is not being used for the user.- Parameters:
name- The middle name of the user- See Also:
-
setLastName
The last name of the user, if the fullName is not being used for the user.- Parameters:
name- The last name of the user- See Also:
-
setFullName
The full name of the user.- See Also:
-
setUsername
What this user uses to actually log in. Often the same asemail. -
setEmail
The user's email address. -
setPhone
The user's phone number -
setServiceId
If the auth service received this user from a BLC service (ex: the admin user service or the customer service), this field will be the ID value used by that service for this user.If this value is set, there should also be a value set for
type.Only if both values are non-null, a combination of this field and
typewill be unique across all records in the authentication service. There is no uniqueness guarantee for records which have a null service ID or nulltype.- See Also:
-
type
-
setType
Represents the type of user this is. This value must be supplied ifserviceIdis set.- See Also:
-
serviceIdUserType
-
setExternalId
Intended to hold any unique identifier for this user as known by an external (non-BLC) system. For example, many implementations may integrate or import/export data from other systems that manage their own unique identifiers.- Parameters:
externalId- a unique identifier for this user in a non-BLC system
-
setTenantId
The id of the tenant this user is associated with. -
setCustomerContextId
This field only applies toUserType.CUSTOMERusers.The id of the customer context this user is a member of. If this is set, this user is restricted to this customer context.
-
setLastUpdated
Indicates when this record was last updated. -
setAttributes
Additional attributes of a user. All of a User's attributes that are available at the time of registration are available. -
setLocked
public void setLocked(boolean locked) Indicates the user has been locked due to too many failed login attempts. -
setAccountRoles
Roles this user has under specific Account contexts. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-