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

    • 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 Request URI which triggered this login request
        Returns:
        this builder
      • setErrorRedirectUri

        @Nonnull
        public T setErrorRedirectUri​(@Nullable
                                     java.net.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
                              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 handler
        NotFoundException - if an IdP with the given name does not exist
        java.lang.Exception - if there is an unexpected problem creating the new web auth request