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 java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.URIbuild()Builds a new Web Auth Request from this builder's paramsTsetApp(java.lang.String app)TsetErrorRedirectUri(java.net.URI errorRedirectUri)TsetHandler(WebAuthRequestCollection.WebAuthResponseHandler handler)TsetIdp(java.lang.String idp)TsetNativeApp(java.lang.Boolean nativeApp)TsetRequestUri(java.net.URI requestUri)
-
-
-
Method Detail
-
setIdp
@Nonnull public T setIdp(@Nonnull java.lang.String idp)
- Parameters:
idp- the name of the IdP into which the user should login- Returns:
- this builder
-
setApp
@Nonnull public T setApp(@Nonnull java.lang.String app)
- Parameters:
app- the name of the app the user is logging into- Returns:
- this builder
-
setRequestUri
@Nonnull public T setRequestUri(@Nonnull java.net.URI requestUri)
- Parameters:
requestUri- the incoming HTTP RequestURIwhich triggered this login request- Returns:
- this builder
-
setHandler
@Nonnull public T setHandler(@Nonnull WebAuthRequestCollection.WebAuthResponseHandler handler)
- Parameters:
handler- theWebAuthRequestCollection.WebAuthResponseHandlerto handle the web auth response for this request- Returns:
- this builder
-
setErrorRedirectUri
@Nonnull public T setErrorRedirectUri(@Nullable java.net.URI errorRedirectUri)
- Parameters:
errorRedirectUri- an optionalURIto redirect the user if there is an error handling the web auth response. a value of null means there is no error redirectURIset.- Returns:
- this builder
-
setNativeApp
@Nonnull public T setNativeApp(@Nullable java.lang.Boolean nativeApp)
- Parameters:
nativeApp- trigger the native app authentication flow- Returns:
- this builder
-
build
@Nonnull public java.net.URI build() throws java.lang.ExceptionBuilds a new Web Auth Request from this builder's params- Returns:
- the
URIto which the user should be redirected in order to login at the IdP - Throws:
java.lang.NullPointerException- if any of the following were not set on this builder: IdP name, app name, requestUri, or handlerNotFoundException- if an IdP with the given name does not existjava.lang.Exception- if there is an unexpected problem creating the new web auth request
-
-