delphi - Kbmmw. Time out message "Anonymous user not authorized" -


i made new topic issue.

kim told\

anonymous requests typically means not find username/password not token in clients request. remember token on first request should reused subsequent requests client code (all kbmmwsimpleclient, kbmmwclientquery, kbmmwclientresolver etc). on way centralize put tkbmmwsimpleclient on datamodule , specify client query components use simple client instance template. first thing before else in client application, make initial "login" request call via simpleclient.

i changed serversidequeryallclick on client app. copied token server side client edit1.text.

procedure tform1.btnnamedserversidequeryallclick(sender: tobject); begin      // gets records server event table.      if length(trim(edit1.text)) > 0         begin           kbmmwsimpleclient1.disconnect;            kbmmwsimpleclient1.username:= cb1.text; // login -> franz           kbmmwsimpleclient1.password:= cb2.text; // password -> franzpassword            kbmmwsimpleclient1.token := edit1.text; // token server           kbmmwsimpleclient1.connect;          end;       if qserverside.active qserverside.close;       // use named query.      qserverside.query.text:='@all_events';      qserverside.open; end; 

it dowsn't work.

how make relogin?

the authorization demo shows how client has simpleclient used template client query components (by setting client property point @ simpleclient instance). when setting token, not want set username or password, , if setting username , password, not set token.

also make sure qserverside.client points on simpleclient. doing need setup username/password once on simpleclient before opened, example open query component, after simpleclient.token value automatically have been updated server assigned login token.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -