Package io.continual.iam.identity
Class UserContext<I extends Identity>
java.lang.Object
io.continual.iam.identity.UserContext<I>
- All Implemented Interfaces:
JsonSerialized
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic UserContext.Builder<Identity>builder()Create a builder for an UserContextGet the ID of the actual authenticated user.Get the ID of the effective user.Get the identity of the user that is actually authenticated, which may be different from the "executed as" user.getUser()Get the identity for the user that this transaction is being "executed as".org.json.JSONObjecttoJson()toString()
-
Method Details
-
builder
Create a builder for an UserContext- Returns:
- a new builder
-
getUser
Get the identity for the user that this transaction is being "executed as".- Returns:
- an identity
-
getSponsor
Get the identity of the user that is actually authenticated, which may be different from the "executed as" user.- Returns:
- an identity
-
getEffectiveUserId
Get the ID of the effective user. Equivalent to getUser().getId()- Returns:
- the effective user ID
-
getActualUserId
Get the ID of the actual authenticated user. Equivalent to getSponsor().getId()- Returns:
- the actual user ID
-
toString
-
toJson
public org.json.JSONObject toJson()- Specified by:
toJsonin interfaceJsonSerialized
-