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, Map<String, Object> attributes, boolean locked, boolean expired, boolean changePasswordRequired, Set<AdminRoleRef> roles, boolean applicationAccess, boolean tenantAccess, Set<String> applicationIds) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The applications this user is restricted to.<T> T
getAttribute
(String key) Additional attributes of a user.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.The middle name of the user, if the fullName is not being used for the user.getPhone()
The user's phone numbergetRoles()
The roles of the user.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.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.boolean
hasAttribute
(String key) int
hashCode()
boolean
Indicate if this user has access to the application levelboolean
A flag indicating whether the admin user account requires a password reset.boolean
A flag indicating whether the admin user account is expired.boolean
isLocked()
Indicates the user has been locked due to too many failed login attempts.boolean
Indicate if this user has access to the tenant levelvoid
setApplicationAccess
(boolean applicationAccess) Indicate if this user has access to the application levelvoid
setApplicationIds
(Set<String> applicationIds) The applications this user is restricted to.void
setAttributes
(Map<String, Object> attributes) Additional attributes of a user.void
setChangePasswordRequired
(boolean changePasswordRequired) A flag indicating whether the admin user account requires a password reset.void
The user's email address.void
setExpired
(boolean expired) A flag indicating whether the admin user account is expired.void
setExternalId
(String externalId) Intended to hold any unique identifier for this user as known by an external (non-BLC) system.void
setFirstName
(String firstName) The first name of the user, if the fullName is not being used for the user.void
setFullName
(String fullName) The full name of the user.void
void
setLastName
(String lastName) The last name of the user, if the fullName is not being used for the user.void
setLocked
(boolean locked) Indicates the user has been locked due to too many failed login attempts.void
setMiddleName
(String middleName) The middle name of the user, if the fullName is not being used for the user.void
The user's phone numbervoid
setRoles
(Set<AdminRoleRef> roles) The roles of the user.void
setServiceId
(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.void
setTenantAccess
(boolean tenantAccess) Indicate if this user has access to the tenant levelvoid
setTenantId
(String tenantId) The id of the tenant this user is associated with.void
Represents the type of user this is.void
setUsername
(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, Map<String, Object> attributes, boolean locked, boolean expired, boolean changePasswordRequired, Set<AdminRoleRef> roles, boolean applicationAccess, boolean tenantAccess, Set<String> applicationIds)
-
-
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:
-
Customer#getName()
-
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:
-
Customer#getName()
-
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:
-
Customer#getName()
-
getFullName
The full name of the user.- See Also:
-
Customer#getName()
-
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
type
will 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 ifserviceId
is set.- See Also:
-
serviceId
UserType
-
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. -
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. -
isExpired
public boolean isExpired()A flag indicating whether the admin user account is expired. If false, they will not be able to log in.This flag can be used to declare an account as expired and unusable, but currently there is no logic for that. It will always be
false
.- Returns:
- true if the admin user account is expired, false otherwise
-
isChangePasswordRequired
public boolean isChangePasswordRequired()A flag indicating whether the admin user account requires a password reset. If true, they will not be able to log in until they reset their password.- Returns:
- true if the admin user's password is expired and requires a reset, false otherwise
-
getRoles
The roles of the user. Not generally relevant, but is useful if user modification originates from the auth service. -
isApplicationAccess
public boolean isApplicationAccess()Indicate if this user has access to the application level -
isTenantAccess
public boolean isTenantAccess()Indicate if this user has access to the tenant level -
getApplicationIds
The applications this user is restricted to. -
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:
-
Customer#getName()
-
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:
-
Customer#getName()
-
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:
-
Customer#getName()
-
setFullName
The full name of the user.- See Also:
-
Customer#getName()
-
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
type
will 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 ifserviceId
is set.- See Also:
-
serviceId
UserType
-
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. -
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. -
setExpired
public void setExpired(boolean expired) A flag indicating whether the admin user account is expired. If false, they will not be able to log in.This flag can be used to declare an account as expired and unusable, but currently there is no logic for that. It will always be
false
.- Parameters:
expired
- true if the admin user account is expired, false otherwise
-
setChangePasswordRequired
public void setChangePasswordRequired(boolean changePasswordRequired) A flag indicating whether the admin user account requires a password reset. If true, they will not be able to log in until they reset their password.- Parameters:
changePasswordRequired
- true if the admin user's password is expired and requires a reset, false otherwise
-
setRoles
The roles of the user. Not generally relevant, but is useful if user modification originates from the auth service. -
setApplicationAccess
public void setApplicationAccess(boolean applicationAccess) Indicate if this user has access to the application level -
setTenantAccess
public void setTenantAccess(boolean tenantAccess) Indicate if this user has access to the tenant level -
setApplicationIds
The applications this user is restricted to. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-