public class LDUser
extends java.lang.Object
LDUser
object contains specific attributes for a user of your application. The only
mandatory property property is the key
, which must uniquely identify each user. For
authenticated users, this may be a username or e-mail address. For anonymous users, this could be
an IP address or session ID.
Besides the mandatory key
, LDUser
supports two kinds of optional attributes:
interpreted attributes (e.g. ip
and country
) and custom attributes. LaunchDarkly
can parse interpreted attributes and attach meaning to them. For example, from an ip
address, LaunchDarkly can do a geo IP lookup and determine the user's country.
Custom attributes are not parsed by LaunchDarkly. They can be used in custom rules-- for example, a custom attribute such as "customer_ranking" can be used to launch a feature to the top 10% of users on a site.
Modifier and Type | Class and Description |
---|---|
static class |
LDUser.Builder
|
Modifier | Constructor and Description |
---|---|
protected |
LDUser(LDUser.Builder builder) |
protected LDUser(LDUser.Builder builder)