testpress / android

Testpress Android App
MIT License
9 stars 4 forks source link

If authentication key has expired, app doesn't notify login screen #2

Closed bharathwaaj closed 9 years ago

bharathwaaj commented 9 years ago

If server returns 403 forbidden, app should show login screen. But shows empty list.

Steps

  1. Login with username and password
  2. Delete token in server
  3. Try refreshing the available exams list

Expected Should show login screen

Observed List is empty

bharathwaaj commented 9 years ago

399 2485-2546/in.testpress.testpress.debug D/Retrofit﹕ ---> HTTP GET https://demo.testpress.in/api/v2.1/exams/available/ 04-24 12:48:02.399 2485-2546/in.testpress.testpress.debug D/Retrofit﹕ Authorization: JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3RwcmVzcyIsInVzZXJfaWQiOjE3LCJlbWFpbCI6InN1cHBvcnRAdGVzdHByZXNzLmluIiwiZXhwIjoxNDI5ODUyNjQ2fQ.BgCRPmwQEFuXF2qiieAnZP_NjDEWVPYsJ59-fnCFJVY 04-24 12:48:02.399 2485-2546/in.testpress.testpress.debug D/Retrofit﹕ User-Agent: testpress/1.0 (Android 5.0.2; Motorola Falcon_umtsds / Motorola XT1033; Airtel)[preload=false;locale=en_GB;clientidbase=android-motorola] 04-24 12:48:02.399 2485-2546/in.testpress.testpress.debug D/Retrofit﹕ Content-Type: application/json 04-24 12:48:02.399 2485-2546/in.testpress.testpress.debug D/Retrofit﹕ ---> END HTTP (no body) 04-24 12:48:03.900 2485-2546/in.testpress.testpress.debug D/Retrofit﹕ <--- HTTP 403 https://demo.testpress.in/api/v2.1/exams/available/ (1500ms) 04-24 12:48:03.900 2485-2546/in.testpress.testpress.debug D/Retrofit﹕ Server: nginx/1.6.0 04-24 12:48:03.900 2485-2546/in.testpress.testpress.debug D/Retrofit﹕ Date: Fri, 24 Apr 2015 07:18:04 GMT 04-24 12:48:03.900 2485-2546/in.testpress.testpress.debug D/Retrofit﹕ Content-Type: application/json 04-24 12:48:03.900 2485-2546/in.testpress.testpress.debug D/Retrofit﹕ Transfer-Encoding: chunked 04-24 12:48:03.900 2485-2546/in.testpress.testpress.debug D/Retrofit﹕ Connection: keep-alive 04-24 12:48:03.900 2485-2546/in.testpress.testpress.debug D/Retrofit﹕ Vary: Accept-Encoding 04-24 12:48:03.900 2485-2546/in.testpress.testpress.debug D/Retrofit﹕ Vary: Cookie 04-24 12:48:03.900 2485-2546/in.testpress.testpress.debug D/Retrofit﹕ X-Frame-Options: SAMEORIGIN 04-24 12:48:03.900 2485-2546/in.testpress.testpress.debug D/Retrofit﹕ Allow: GET, POST, HEAD, OPTIONS 04-24 12:48:03.900 2485-2546/in.testpress.testpress.debug D/Retrofit﹕ OkHttp-Selected-Protocol: http/1.1 04-24 12:48:03.900 2485-2546/in.testpress.testpress.debug D/Retrofit﹕ OkHttp-Sent-Millis: 1429859883497 04-24 12:48:03.900 2485-2546/in.testpress.testpress.debug D/Retrofit﹕ OkHttp-Received-Millis: 1429859883897 04-24 12:48:03.910 2485-2546/in.testpress.testpress.debug D/Retrofit﹕ {"detail": "Error decoding signature."} 04-24 12:48:03.910 2485-2546/in.testpress.testpress.debug D/Retrofit﹕ <--- END HTTP (39-byte body)