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.URI
build()
Builds a new Web Auth Request from this builder's paramsT
setApp(java.lang.String app)
T
setErrorRedirectUri(java.net.URI errorRedirectUri)
T
setHandler(WebAuthRequestCollection.WebAuthResponseHandler handler)
T
setIdp(java.lang.String idp)
T
setNativeApp(java.lang.Boolean nativeApp)
T
setRequestUri(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 RequestURI
which triggered this login request- Returns:
- this builder
-
setHandler
@Nonnull public T setHandler(@Nonnull WebAuthRequestCollection.WebAuthResponseHandler handler)
- Parameters:
handler
- theWebAuthRequestCollection.WebAuthResponseHandler
to handle the web auth response for this request- Returns:
- this builder
-
setErrorRedirectUri
@Nonnull public T setErrorRedirectUri(@Nullable java.net.URI errorRedirectUri)
- Parameters:
errorRedirectUri
- an optionalURI
to redirect the user if there is an error handling the web auth response. a value of null means there is no error redirectURI
set.- 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.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:
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
-
-