Queries regarding Http Request

8 views
Skip to first unread message

Ruchika Mandloi

unread,
May 5, 2020, 11:05:08 AM5/5/20
to Aerogear
Hello,

I am Implementing Aerogear keycloak Service in my IOS Application. Currently, 


The flow of my demo:


1. Got the access_token from external webView
2. Also able to fetch refresh_token
3. There is a get call which I request through Aerogear Http.swift API calling methods and though which I got the response too.

My query is regarding this Http API's calling methods. Actually my project has its own manager for calling API's and I want to use the same manager with Areaogear keycloak Token feather. Is it possible to do so?

I appreciate your prompt response.

Thanks & Regards
Ruchika

Ruchika Mandloi

unread,
May 11, 2020, 8:15:43 AM5/11/20
to Aerogear
Hello,

Reminder, Do needfully I am waiting for your revert.

--
You received this message because you are subscribed to the Google Groups "Aerogear" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aerogear+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aerogear/6e94a689-3b5a-468e-a2bd-3483e24812fc%40googlegroups.com.


--
 
Ruchika Mandloi
IOS Developer

Massimiliano Ziccardi

unread,
May 11, 2020, 9:13:51 AM5/11/20
to Ruchika Mandloi, Aerogear
Hi Ruchika, 
can you please tell me what library/version are you using?

Regards,
Massimiliano

Ruchika Mandloi

unread,
May 11, 2020, 10:51:51 AM5/11/20
to Massimiliano Ziccardi, Aerogear
Hi Massimiliano,

Glad to hear from you. I am using the latest version of the Aerogear 2.1.0 Version. I am having more queries regarding this library. I have tried a custom call scenario that discussed with you in the previous mail and its working. But with this got new issues:

1. once I log in from keycloak and have the access token and other Information but when I fresh launch my application after killing from the background it will again want login because in its AuthSessionModule I got the nil values like AutherizationFileds, IsAutherized, and other attributes.

2. after few mins my API response me 401 UnAutherized and not able to access the access token and refresh token.

Can we schedule a call so that I can brief out my things more clearly?

Summers Pittman ℝ

unread,
May 11, 2020, 12:00:29 PM5/11/20
to Ruchika Mandloi, Massimiliano Ziccardi, Aerogear

Summers Pittman
>>Phone:404 941 4698
>>Java is my crack.



On Mon, May 11, 2020 at 10:51 AM Ruchika Mandloi <ruchika...@innoeye.com> wrote:
Hi Massimiliano,

Glad to hear from you. I am using the latest version of the Aerogear 2.1.0 Version. I am having more queries regarding this library. I have tried a custom call scenario that discussed with you in the previous mail and its working. But with this got new issues:


Can you point us to what library you're using? "Aerogear 2.1.0" doesn't ring a bell for us.
 

Ruchika Mandloi

unread,
May 12, 2020, 5:18:54 AM5/12/20
to Summers Pittman ℝ, Massimiliano Ziccardi, Aerogear
Hi Summers,

I am attaching my podfile.lock screenshot please refer to this. All the information provided in the same.

I didn't call you on your given number can you provide your skype id here so that we can communicate.
Screenshot 2020-05-12 at 2.25.34 PM.png

Summers Pittman ℝ

unread,
May 12, 2020, 9:35:54 AM5/12/20
to Ruchika Mandloi, Massimiliano Ziccardi, Aerogear

Taking a look, that makes sense why I didn't recognize the library, we stopped developing it 3 years ago.

To answer your original question, you want to call `authorizationFields()` on the OAuth2Module that the OauthLibrary returns.  This is the Authorization header and you can set that header in the http request of the library you're using.

With AeroGear HTTP we build in the ability to use modules of different types from our other libraries to effect the HTTP lifecycle. So what you need to do is call the Oauth2Module and get the fields from that and manually set it in your request.

As far as a video meeting goes, I'm US east coast timezone and tend to be busy until 2PM EDT.  Let's give email a few tries and if you're still stuck we can work on skype.


Summers Pittman
>>Phone:404 941 4698
>>Java is my crack.


Ruchika Mandloi

unread,
May 12, 2020, 12:27:37 PM5/12/20
to Summers Pittman ℝ, Massimiliano Ziccardi, Aerogear
Actually I did the same which you share with me but sometime after refresh token expired I got the error: "Refresh token Expire" and as I debug and Analys the things if I will use the default Http calls then refresh token will update automatically but while using my Manager I have to call refresh_token_call Manually before hitting each call.

Summers Pittman ℝ

unread,
May 15, 2020, 11:09:23 AM5/15/20
to Ruchika Mandloi, Massimiliano Ziccardi, Aerogear
Yes that is correct.

The refresh token timeouts are set by Keycloak, you should be able to view the jwt token to see how long the token is valid and if you need to call refresh. I *Think* the library even provides an isValid style option on the module, but I don't remember.

Summers Pittman
>>Phone:404 941 4698
>>Java is my crack.


Reply all
Reply to author
Forward
0 new messages