Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Login with Database connection(Eclipse IDE for Scout Developers Version: 2018-09 (4.9.0) Build id: 20180917-1800)
Login with Database connection [message #1798239] Wed, 14 November 2018 15:18 Go to next message
marco giudici is currently offline marco giudiciFriend
Messages: 201
Registered: February 2013
Location: Italy
Senior Member
Hi,
I'm developing a tool with Eclipse Scout Pothon and I want inser a login page that check the credentials in a specific table in a database.
I see various examples but for the moment I didn't find nothing about that.
Have you any suggestions where start?

Thanks in advance for any hint

[Updated on: Wed, 14 November 2018 15:18]

Report message to a moderator

Re: Login with Database connection [message #1798617 is a reply to message #1798239] Wed, 21 November 2018 09:09 Go to previous message
Patrick Bänziger is currently offline Patrick BänzigerFriend
Messages: 90
Registered: September 2011
Member
Hello Marco

There is no working example at this time for this.

The basics you'll need to implement are as follows:


  1. Add a login page and necessary redirects and configuration (This should be handled in the HelloWorld app)
  2. Add an access controller to the front-end Servlet (UI) to authenticate what the user entered against a data source. (In several examples, this is done against a static config file). This is typically done in the UiServletFilter class, where you add additional AccessControllers. In this controller, you'll contact your backend with the credentials.
  3. Implement a service that performs authentication against the database or external authentication provider. This would typically be done on the backend server. Most likely, since you haven't got a user and can't call Scout services like that (without additional work), you'll implement an additional Servlet and register it in the web.xml. To do anything with the database, don't forget to create a new ServerRunContext here!


A good starting point would be this question.


As always with security matters: Please be careful with your implementation and consider security risks and OWASP best practices. Depending on your environment and deployment scenario, you might be able to delegate authentication to a webapp container or use an existing well-tested implementation.
Otherwise, the Scout SecurityUtility has many methods to help you create hashed and salted passwords, if you really need to implement it yourself.
Previous Topic:Form Field in Menu
Next Topic:Detail Form on TablePage
Goto Forum:
  


Current Time: Tue Oct 15 01:17:05 GMT 2019

Powered by FUDForum. Page generated in 0.01791 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top