Class WebAuthRequestCollection.WebAuthRequestBuilder<T extends WebAuthRequestCollection.WebAuthRequestBuilder<T>>

java.lang.Object
com.inductiveautomation.ignition.gateway.auth.web.WebAuthRequestCollection.WebAuthRequestBuilder<T>
Direct Known Subclasses:
WebAuthRequestCollection.LoginRequestBuilder, WebAuthRequestCollection.LogoutRequestBuilder
Enclosing class:
WebAuthRequestCollection

public abstract class WebAuthRequestCollection.WebAuthRequestBuilder<T extends WebAuthRequestCollection.WebAuthRequestBuilder<T>> extends Object
Provides a fluent-API (builder-style) pattern for creating new web auth requests encoded as a URI
  • Method Details

    • setIdp

      @Nonnull public T setIdp(@Nonnull String idp)
      Parameters:
      idp - the name of the IdP into which the user should login
      Returns:
      this builder
    • setApp

      @Nonnull public T setApp(@Nonnull String app)
      Parameters:
      app - the name of the app the user is logging into
      Returns:
      this builder
    • setRequestUri

      @Nonnull public T setRequestUri(@Nonnull URI requestUri)
      Parameters:
      requestUri - the incoming HTTP Request URI which triggered this login request
      Returns:
      this builder
    • setHandler

      @Nonnull public T setHandler(@Nonnull WebAuthRequestCollection.WebAuthResponseHandler handler)
      Parameters:
      handler - the WebAuthRequestCollection.WebAuthResponseHandler to handle the web auth response for this request
      Returns:
      this builder
    • setErrorRedirectUri

      @Nonnull public T setErrorRedirectUri(@Nullable URI errorRedirectUri)
      Parameters:
      errorRedirectUri - an optional URI to redirect the user if there is an error handling the web auth response. a value of null means there is no error redirect URI set.
      Returns:
      this builder
    • setNativeApp

      @Nonnull public T setNativeApp(@Nullable Boolean nativeApp)
      Parameters:
      nativeApp - trigger the native app authentication flow
      Returns:
      this builder
    • setTimeout

      @Nonnull public T setTimeout(@Nullable Integer timeout)
      Parameters:
      timeout - time in minutes to wait for the response before giving up
      Returns:
      this builder
    • build

      @Nonnull public URI build() throws Exception
      Builds a new Web Auth Request from this builder's params
      Returns:
      the URI to which the user should be redirected in order to login at the IdP
      Throws:
      NullPointerException - if any of the following were not set on this builder: IdP name, app name, requestUri, or handler
      NotFoundException - if an IdP with the given name does not exist
      Exception - if there is an unexpected problem creating the new web auth request