Class IamContext
java.lang.Object
com.chaosguide.iam.vertex.context.IamContext
Convenience accessors for the current IAM-authenticated request.
-
Method Summary
Modifier and TypeMethodDescriptionstatic IamContextcurrent()Returns the current IAM user or throws an SDK exception when the request is unauthenticated.Returns the raw access token for explicit user-profile calls, if Spring exposes it.static Optional<IamContext> Returns the current IAM context from a verified JWT or an authenticated server-session principal.static IamCurrentUserReturns the immutable current-user value object, useful for injection and audit DTOs.static Optional<IamCurrentUser> Returns the current-user value object if the request is IAM authenticated.getEmail()getOrgId()getRoles()booleanhasMfa()booleanhasPermission(String resource, String action) booleanstatic IamContextAlias forcurrent()for call sites that prefer explicit naming.static IamCurrentUserAlias forcurrentUser()for call sites that prefer explicit naming.user()
-
Method Details
-
current
Returns the current IAM user or throws an SDK exception when the request is unauthenticated. -
currentOptional
Returns the current IAM context from a verified JWT or an authenticated server-session principal. -
currentUser
Returns the immutable current-user value object, useful for injection and audit DTOs. -
currentUserOptional
Returns the current-user value object if the request is IAM authenticated. -
requireCurrent
Alias forcurrent()for call sites that prefer explicit naming. -
requireCurrentUser
Alias forcurrentUser()for call sites that prefer explicit naming. -
currentAccessToken
-
user
-
getUserId
-
getEmail
-
getRoles
-
getPermissions
-
getOrgId
-
getOrgRole
-
getActorId
-
hasPermission
-
isImpersonating
public boolean isImpersonating() -
hasMfa
public boolean hasMfa()
-