Class WebAuthUserContext
- java.lang.Object
-
- com.inductiveautomation.ignition.common.auth.web.WebAuthUserContext
-
- All Implemented Interfaces:
java.io.Serializable
public class WebAuthUserContext extends java.lang.Object implements java.io.Serializable
Provides context about a user who authenticated using web-based protocols such as OIDC or SAML- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WebAuthUserContext.Builder
Provides a fluent-API (builder-style) pattern for creating newWebAuthUserContext
objectsstatic class
WebAuthUserContext.GsonAdapter
AJsonSerializer
andJsonDeserializer
implementation for serializing and de-serializingWebAuthUserContext
objects to / from JSON using GSON APIs.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WebAuthUserContext.Builder
builder()
boolean
equals(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()
int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
getIdp
public java.util.Optional<java.lang.String> getIdp()
- Returns:
- an
Optional
containing 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
Optional
containing theWebAuthUser
which 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
ImmutableCollection
ofSecurityLevelConfig
objects
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
builder
public static WebAuthUserContext.Builder builder()
- Returns:
- a new
WebAuthUserContext.Builder
instance
-
-