You are not logged in.
Pages: 1
In this video, I’ll show you authentication scheme considering the HTTP transporter using DataSnap REST and mORMot. This is my first webservice using mORMot.
-----
I've just modified the framework code to match the authentication JavaScript code supplied…
Json should return {success: true} --> if authenticate succeed.
{success: false} --> if authenticate fail
Before changes: // {"ErrorCode":400 "ErrorText":"Bad Request"}
After changes// { "success":false,"result":[{"ErrorCode":400},{"ErrorText":"Bad Request"}]};
---------------------------------------------------
AddShort('{"success":false,');
AddShort('"result":[{"ErrorCode":');
Add(call.OutStatus);
AddShort('},{"ErrorText":"');
AddJSONEscape(pointer(ErrorMsg));
AddShort('"}]}');
SetText(Call.OutBody);
// { "success":false,"result":[{"ErrorCode":400},{"ErrorText":"Bad Request"}]};
---------------------------------------------------
{"success":true,"result":"76+6d1c0d5ac8b658a4477009f6b75c0de0c6259a8f7b467df77573f542df16c0ad","logonname":"User"}
Ctxt.Returns(['success',true,'result',Session.fPrivateSalt,'logonname',User.LogonName]);
Regards,
warleyalex
Offline
Very nice!
This is a clear demonstration of how our authentication works in mORMot.
See http://blog.synopse.info/post/2011/05/2 … entication
Just to add a nice feature of mORMot: automatic authentication using Windows Credentials.
That is, on a corporate server, you can be logged directly using your Windows session credential - you do not need to enter any login/password, but you are logged securely to the application, with your Windows logon name.
For corporate solutions, this is pretty secure.
For the end-user, this is transparent and perfectly user-friendly: you do not have to enter any login/password, nor has to set/reset/remember your them...
(available in the trunk, i.e. mORMot 1.18)
See http://blog.synopse.info/post/2012/11/2 … redentials
Thanks for sharing your knowledge!
Have you some JavaSCript code to publish?
It may help other users.
Offline
Nice video.
An example on how to implement authentication in mORMot is much appreciated.
fpcdeluxe, FPC 3.2 / Lazarus 2.0, mORMot on Windows 10 ...
Offline
An example on how to implement authentication in mORMot is much appreciated.
For which kind of client?
There are already several sample code around in this forum, and the SAD pdf details the process very deeply.
Offline
Pages: 1