Class WebAuthStatus

java.lang.Object
com.inductiveautomation.perspective.gateway.api.WebAuthStatus

public class WebAuthStatus extends Object
Encapsulates a snapshot of authentication and authorization state
  • Method Details

    • isAuthenticationRequired

      public boolean isAuthenticationRequired()
    • isAuthenticated

      public boolean isAuthenticated()
    • isAuthorized

      public boolean isAuthorized()
    • canLogin

      public boolean canLogin()
      Returns:
      whether the session's project has at least one selectable login Identity Provider, i.e. whether a login is possible. See canLogin.
    • getUser

      public @NonNull Optional<WebAuthUser> getUser()
    • getSecurityLevels

      public @NonNull com.google.common.collect.ImmutableSet<SecurityLevelConfig> getSecurityLevels()
    • getIdp

      public @NonNull Optional<String> getIdp()
    • getIdpAttributes

      public @NonNull com.inductiveautomation.ignition.common.gson.JsonObject getIdpAttributes()
    • getAuditActor

      public @NonNull AuditActor getAuditActor()
      Returns:
      an AuditActor derived from a single snapshot of this status. Returns AuditActor.UNAUTHENTICATED if no user is present; otherwise an AuditActor.IdpUser built from the IdP name (if any) and the username. Reading the actor from this snapshot avoids the race where IdP and username are fetched from different status instances.
    • diff

      public static WebAuthStatus.Diff diff(WebAuthStatus webAuthStatusA, WebAuthStatus webAuthStatusB)
    • diff

      public WebAuthStatus.Diff diff(WebAuthStatus that)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • builder

      public static @NonNull WebAuthStatus.Builder builder()