Note that there are some explanatory texts on larger screens.

plurals
  1. POLog out the user on the iOS 4 with HTTPBasicAuthentication
    primarykey
    data
    text
    <p>I am programming an iPhone application. My (existing) web-application uses Ruby on Rails (2.3.2) to serve the data. Ruby on Rails backend uses restful-authentication gem to authenticate the users.</p> <p>To get user data from the server to the iPhone app I use HTTPRiot framework and authenticate user with HTTPBasicAuthentication.</p> <p>Now everything works fine - user can get and post some data to and from the iPhone app. But when I want to log out the user from the service it seems impossible. From the different topics I understood that logout was just not implemented in HTTPBasicAuthentication and I completely OK with that. I tried to find a work around like implementing a switch in the Settings.app to force my app to display the login screen when user goes back to the app.</p> <p>The problem is: iOS4 keeps connection kind of "open" when app is entering background. To log out from HTTPBasicAuthenticated connection, this connection needs to be broken. Using this approach my user needs to quit the app, turn the switch on in the Settings.app, delete my app from multitasking and start my app again. This is too dirty.</p> <p>My question is: is there a cleaner way to logout/change the user without completely leaving the application?</p> <p>Some references: <a href="http://labratrevenge.com/httpriot/docs/" rel="nofollow noreferrer">HTTPRiot</a>, <a href="https://stackoverflow.com/questions/660155/logout-with-http-basic-authentication-and-restful-authentication-plugin">Logout and basic auth</a>, <a href="https://stackoverflow.com/questions/449788/http-authentication-logout-via-php">Logout and basic auth 2</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload