Class WebAuthUserContext.Builder
- java.lang.Object
-
- com.inductiveautomation.ignition.common.auth.web.WebAuthUserContext.Builder
-
- Enclosing class:
- WebAuthUserContext
public static class WebAuthUserContext.Builder extends java.lang.Object
Provides a fluent-API (builder-style) pattern for creating newWebAuthUserContext
objects
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WebAuthUserContext
build()
WebAuthUserContext.Builder
setIdp(java.lang.String idp)
WebAuthUserContext.Builder
setSecurityLevels(com.google.common.collect.ImmutableCollection<SecurityLevelConfig> securityLevels)
WebAuthUserContext.Builder
setSecurityZones(com.google.common.collect.ImmutableCollection<java.lang.String> securityZones)
WebAuthUserContext.Builder
setWebAuthUser(WebAuthUser webAuthUser)
-
-
-
Method Detail
-
setIdp
public WebAuthUserContext.Builder setIdp(@Nullable java.lang.String idp)
- Parameters:
idp
- the name of the IdP from where the user authenticated. set to null if the user is not authenticated. defaults to null if not called.- Returns:
- this
WebAuthUserContext.Builder
-
setSecurityZones
public WebAuthUserContext.Builder setSecurityZones(@Nullable com.google.common.collect.ImmutableCollection<java.lang.String> securityZones)
- Parameters:
securityZones
- anImmutableCollection
containing the names of the security zones assigned to the user- Returns:
- this
WebAuthUserContext.Builder
-
setWebAuthUser
public WebAuthUserContext.Builder setWebAuthUser(@Nullable WebAuthUser webAuthUser)
- Parameters:
webAuthUser
- theWebAuthUser
which contains attributes about the authenticated user such as their username and roles. set to null if the user is not authenticated. defaults to null if not called.- Returns:
- this
WebAuthUserContext.Builder
-
setSecurityLevels
public WebAuthUserContext.Builder setSecurityLevels(@Nullable com.google.common.collect.ImmutableCollection<SecurityLevelConfig> securityLevels)
- Parameters:
securityLevels
- the security levels granted to the user, represented in tree-form as anImmutableCollection
ofSecurityLevelConfig
objects- Returns:
- this
WebAuthUserContext.Builder
-
build
public WebAuthUserContext build()
- Returns:
- a new
WebAuthUserContext
instance with the field values set using this builder's setter methods
-
-