You are not logged in.
Is there a way of adding extra params while sending login request?
and process it on the server side ?
eg:l'd like to send the client version and recapcha code along with the client.setuser() method.
thks.
Offline
You can define your own authentication class then:
- override the TSQLRestServerAuthenticationDefault.ClientComputeSessionKey() method on the client side;
- override TSQLRestServerAuthenticationDefault.Auth() for the server side.
Offline
i thought that too~~ thks.
another thing , when registered my own Auth class , it won't work , because the server already have a TSQLRestServerAuthenticationDefault and a TSQLRestServerAuthenticationNone auth classes registered by default , but the Server Auth method process the auth only use the FIRST one in the auth scheme list . the other has NO changce to perform .
but if you UnRegester all the old sheme (make yours the first) , it will work fine. BUT!!!~~ then che CrossClient wrapper will NOT generate the auth code . since it only check if there is a TSQLRestServerAuthenticationDefault or TSQLRestServerAuthenticationNONE .
this kind of logic is a little buggy~
Offline
Of course, as documented, you have to unregister first the other uneeded authentication (and also note that TSQLRestServerAuthenticationNone is not registered, IIRC).
By design, cross-platform clients don't share code with the main mORMot.pas so you need to change also the cross-platform client code with another custom TSQLRestServerAuthenticationClass.
Instead of messing with the authentication classes, I would use default auth, and provide additional service interface methods for your recapcha logic, or put the recapcha info in the user name field.
Offline
Thks for the reply , i will use the "Override the TSQLRestServerAuthenticationDefault Class " approche.
Offline