JWT auth: checking user rights in db


I am quite new to Aurelius, XData and Data Modeler but starting to really like these tools already. 

But I am struggling to implement JWT auth by checking a UserName against a database table which has been mapped to an Aurelius class. I had a look at the JWTAuthDemo and the authserver demo project. 

Is there a way to make use of the auth server's XData connection pool to authenticate a user and pull a i.e. TUser object from a database table? I can not make head or tails of it at the moment. 

Any help or an extended example would be highly appreciated. Thank you!

Kind regards,


If you take the auth server as a starting point, wouldn't it be just using the Connection Pool and/or the Context Manager (http://www.tmssoftware.biz/business/xdata/doc/web/txdataoperationcontext.html) in the TLoginService.Login method implementation?

In the Login implementation, just get the Manager, perform operations in the database (for example, retrieve the TUser object), and build your token with proper data from the TUser object.

Thank you, somehow I must have overlooked that chapter in the online help. Works as expected now.