1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/docs/unleash-context.md

23 lines
813 B
Markdown
Raw Normal View History

# Unleash Context
2017-02-11 14:35:03 +01:00
In order to standardise a few activation strategies we also needed to
2017-02-11 15:43:11 +01:00
standardise a unleash context, which contains some fields that varies
per requests, needed to implement the activation strategies.
The unleash context is defined by these fields:
- userId: String,
- sessionId: String,
- remoteAddress: String,
- properties: Map<String, String>
All fields are optional, but if they are not set you will not be able to use
certain activation strategies.
E.g. the userWithId-strategy obviously depends on the userId field.
The properties field is more generic and can be used to provide more abritary
data to the strategies. A common usage is to add more metadata, e.g. that the
current user is a beta user, and thus the betaUser-strategy will use this info
2017-02-11 14:35:03 +01:00
in its implementation.