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!

Parents
  • 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

Reply
  • 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

Children
  • Former Member
    0 Former Member over 1 year 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.