You can do this by just putting {{*secured*}} at the top of the HBS file.
Please try it and let us know if that matches your requirement.On Mon, Mar 6, 2017 at 3:18 PM, Nuwandi Wickramasinghe <[email protected]> wrote: > Hi, > > In the User Portal uuf application found in [1], I see an index.hbs which > is used to generate the html for the url https://localhost:9292/user- > portal/. If someone tries to access this URL without login in to the > application, it will redirect the user to login page. > > I would like to implement the same kind of behavior for another UUF app, > (say Admin Portal) but could not find how to handle this with index.hbs. I > could redirect to login page by adding an index.js and implementing > *onGet(env) > *to check the session and do the redirection accordingly. > > Please find the app.yaml and component.yaml files attached. So far I have > implemented index.hbs, index.js, login.hbs and login.js. What I want to do > is to redirect from index page to login page when there's no session > without the help of index.js (as it's done in user-portal). Any help would > be appreciated. > > [1] https://github.com/wso2/product-is/tree/6.0.x-C5_m3/ > portal/apps/org.wso2.carbon.iam.user-portal.app > > regards > Nuwandi > -- > > Best Regards, > > Nuwandi Wickramasinghe > > Software Engineer > > WSO2 Inc. > > Web : http://wso2.com > > Mobile : 0719214873 > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- With regards, *Manu*ranga Perera. phone : 071 7 70 20 50 mail : [email protected]
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
