HTML5 custom project authentication

Hi,

In the 9x html5 web portal, and according to the read.me file, the custom-app project reuses the login component for authentication. But how do you assign a specific authentication module to it? For instance, the qer-app-pwdportal uses rolebaseduser, oauth2 , passwordreset among others, whereas the qbm-app-landingpage adds DialogUser for the administration portal. In general, how do you set a specific auth module for your custom apps? In Manager you can define your HTML applications but nothing related to their auth properties.

Thanks!

  • Hi,

    The authentication is determined by the API project that the HTML5 app connects to.

    The Portal, Administration, and Password Reset API projects all use different "programs". You can see those programs in the Designer tool and manage authentication settings on a program level. Keep in mind that changing authentication settings for a program affects all HTML5 apps running on that program, not just a custom app.

    Thanks
    Hanno

  • Hi Hanno,

    Thanks for the quick response. Yes, I know that. If I go to Designer->Base Data->Security Settings->Programs I can see programs attached to auhentication modules. Some of these programs correspond to api projects, some I cannot find the relationship. For instance PasswordReset is straight forward and it is attached to following auth modules: Password Reset and Password reset (role-based). However, in the apiserver web page I've noticed that I can log to the password reset portal using even more authentication modules such as role based, questions, oauth. So this is one of the things that is confusing me. 

    Other "programs" I cannot find a direct connection to their corresponding api projects , such as API Designer, WebDesigner or WebDesignerEditor, this latter I guess is the older web designer application.

    All in all, to make the question simple: If I need to bind one auth module to my api, in designer -> Base Data->Security Settings->Programs I create a new program and attach the desired auth modules. Then, I create a custom api project and connect my html5 app to it. The gap I need to fillup now  is the connection between the api project and the program, so that I can use the desired auth module. Could I please get a hint?

    Regards!

  • Hi,

    For one thing, there are more programs than there are API projects, because all the other tools (like the WebDesigner Editor) also have corresponding program entries.

    For your custom API project, use the "Product" setting to set the name of the program to be used for authentication.

                var authConfig = new Session.SessionAuthDbConfig
                {
                    AuthenticationType = Config.AuthType.AllManualModules,
                    Product = "WebDesigner",
                    ExcludedAuthentifiers =
                    {
                        // Add the names of any excluded authentifiers here
                    }
                };

    Hope this helps!