开发者

what's the best authentication method for BlackBerry

I'm developing a Java app for blackberry, in this app I have a login form

I'm using basic authentication for the moment to pass the user and password to a page that 开发者_如何学Pythoncalls a PHP script that receives the parameters.

I don't like this method cause it stores the parameters and they cant be erased until you kill the browser or the app. I want to be able to logout without leaving the app.

Is there a better or safer or practical way? To authenticate trough Blackberry!


you should using StreamConnection to make a HTTP or HTTPS Connection to the PHP script. Make sure you are using POST method this will be using setRequestMethod("POST")

The PHP script should just receive the parameters, and check it to your database. If success then return "success", or "fail" if the authentication process is fail

You should find using these classes

StremConnection, HttpConnection,Connector,InputStream,OutputStream

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜