API Portal 8.2x qer-app-pwdportal question

Former Member
Former Member

Hi,

I'm migrating our Password Portal from Web Designer to Angular.In our current solution we use:

  • GetLimitedSQLDataReader , to obtain password recovery options for a given user.
  • QER_PasswordWeb_Authenticate to make an authentication via passcode.
  • VI.DB.JobGeneration.JobGen.Generate to generate an event on a table

I'm making modifications (so far, so good) to qer-app-pwdportal. Could anyone give me a hint on how these former functions translate into the "Angular" version on the portal, or which options do I have as a replacement?
Thanks!

  • Hi,

    These functions work in .NET so there are two steps:

    1) wrap the functions in an API plugin

    2) write Angular code to call the plugin

    For SQL prepared statements, please see a sample API in the file Sdk01_Basics\02-BasicSqlMethod.cs (you can find these samples in the installation set).

            public void Build(IApiBuilder builder)
            {
                builder.AddMethod(Method.Define("sql/changecount")
                    
                    // Insert the statement name (QBMLimitedSQL.Ident_QBMLimitedSQL) and the type
                    .HandleGetBySqlStatement("SystemConfig_ChangeCount", SqlStatementType.SqlExecute)
    
                    // Define the result schema columns and data types
                    .WithResultColumns(new SqlResultColumn("TableName", ValType.String),
                        new SqlResultColumn("Count", ValType.Int)));
            }

    The passcode authentication is already implemented in qer-app-pwdportal; can you elaborate on what is missing?

    And finally, you can call JobGen.Generate as part of an API method definition. Which event are you looking to generate? There may already be an existing API.

    Hope this helps

    Hanno

  • Former Member
    0 Former Member over 2 years ago in reply to Hanno Bunjes

    Hi Hanno,

    Sorry for the delay, I've been off for a few days.

    Thanks for your help. I'll work on it and see where it leads. About your questions:

    1. Passcode auth is integrated, I know. But our version of the password portal allows anonymous users to request a passcode on any of the recovery options available in their profiles: Verified external email address, sms or Telegram. We use the sql prepared statement to get these options for a given centralaccount , and then generate and send a passcode to the user.
    2. The event is a custom event. I think it's not part of any existing API. 

    Thanks.

  • Former Member
    0 Former Member over 2 years ago

    Hi Hanno,

    Excuse my "coming back" to it. I've finished step one, wrote an API plugin to accomplish what I need (it works) and uploaded to the database according to the documentation (talking 9.0):

    1. The .dll file appears in the root of the API Server folder \netpub\wwwroot\apiserver instead of \inetpub\wwwroot\apiserver\bin , is that normal?
    2. How can I configure any pluign for anonymous access (unaunthenticated) ?
    3. For the second step I'm a little bit confused on how to call newer functions from the angular code. Can you point me to some sample code or parts of the code in the github repository with calls to custom functions?

    Thanks and apologies. I'm very new to this.

  • Hi,

    No apologies necessary.

    1. Regarding the DLL file: No, this isn't normal. The DLL file must reside in the bin folder, so you will need to upload it with a "bin\" prefixed path. Open SoftwareLoader and point it at the folder where API Server is installed on IIS. This is unfortunately not clear from the documentation.

    2. Unauthenticated access must be configured for each API method separately using AllowUnauthenticated()

    3. You can build a TypeScript API client that wraps your custom API methods (https://support.oneidentity.com/de-de/technical-documents/identity-manager/9.0%20lts/api-development-guide/7#TOPIC-1847804).

    If you want to make direct API requests, there is a good example in https://github.com/OneIdentity/IdentityManager.Imx/blob/master/imxweb/projects/qer/src/lib/admin/feature-config.service.ts . The MethodDescriptor configures the request. Then use the API Client to submit the request and get the result back. The API Client implementation is this one: https://github.com/OneIdentity/IdentityManager.Imx/blob/master/imxweb/projects/qbm/src/lib/api-client/api-client-fetch.ts  which internally uses window.fetch to make the network request.

    Hope this helps!

  • Former Member
    0 Former Member over 2 years ago in reply to Hanno Bunjes

    Thanks again!

    1. Ok, figured it out and yes , seemed to me it was not the right location.
    2. I'll try it.
    3. I need to dig deeper here, but at least I have a clearer path now.

    I'm sure that will help me move ahead. Appreciate your help!!!

    As we have added new people to our team, we had purchased this course (https://support.oneidentity.com/es-es/identity-manager/training/238/identity-manager-web-portal-development) for the actual web interface designer but had to stop the whole process after the release of the html5/angular version. Do you (sorry for the offtopic) happen to know if there's an updated version (angular) of the course coming to the OI University in the coming months?

  • We have no plans to offer trainings for OneIM development with Angular, beyond what is going to be offered in the form of the video series.

    Thanks,

    Hanno