Class WebAuthUserContext
- java.lang.Object
-
- com.inductiveautomation.ignition.common.auth.web.WebAuthUserContext
-
public class WebAuthUserContext extends java.lang.ObjectProvides context about a user who authenticated using web-based protocols such as OIDC or SAML
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWebAuthUserContext.BuilderProvides a fluent-API (builder-style) pattern for creating newWebAuthUserContextobjectsstatic classWebAuthUserContext.GsonAdapterAJsonSerializerandJsonDeserializerimplementation for serializing and de-serializingWebAuthUserContextobjects to / from JSON using GSON APIs.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WebAuthUserContext.Builderbuilder()booleanequals(java.lang.Object o)java.util.Optional<java.lang.String>getIdp()com.google.common.collect.ImmutableCollection<SecurityLevelConfig>getSecurityLevels()com.google.common.collect.ImmutableCollection<java.lang.String>getSecurityZones()java.util.Optional<WebAuthUser>getWebAuthUser()inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
getIdp
public java.util.Optional<java.lang.String> getIdp()
- Returns:
- an
Optionalcontaining the name of the IdP from where the user authenticated, or an empty Optional if the user is not authenticated in this context
-
getSecurityZones
public com.google.common.collect.ImmutableCollection<java.lang.String> getSecurityZones()
- Returns:
- the names of the security zones that the user belongs to in this context
-
getWebAuthUser
public java.util.Optional<WebAuthUser> getWebAuthUser()
- Returns:
- an
Optionalcontaining theWebAuthUserwhich contains attributes such as their username and roles. Returns an empty Optional if the user is not authenticated in this context
-
getSecurityLevels
public com.google.common.collect.ImmutableCollection<SecurityLevelConfig> getSecurityLevels()
- Returns:
- the security levels granted to the user in this context, represented in tree-form as an
ImmutableCollectionofSecurityLevelConfigobjects
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
builder
public static WebAuthUserContext.Builder builder()
- Returns:
- a new
WebAuthUserContext.Builderinstance
-
-