-
-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ResponseErrorLoginRequiredException while calling user.login() #118
Comments
@outofsight We need to implement some user session recycle service, that means when user session time outs, log out-> log in For you it means to handle the user session time out exception (ResponseErrorLoginRequiredException) or check time of login + session time out time And call
if that still does not work:
I would like to implement some "keep me logged in" service, but there was no need for it (until now) and you can easily implement it your self on top of this library... but PRs are welcomed for sure |
@Salamek Thanks for explaining. I'm not sure how to get session timeout wich I think can be hardware/firmware specific, but checking login time and session timeout seems to me an unreliable way to ensure a valid login session before calling a number of api. Or not? If I well understand, if I want to ensure a valid login session, after some time from last api call, already having a previusly used and saved
|
@outofsight yea, something like that, it needs a bit of "dark magic" to work properly, as you can see whole login and user session implementation is a mess on the huawei part and i had no other option then reflect that in my code... |
Not sure if this a question, an enanchement or a bug. I'm developing a long running service that requires regular access (every 30sec - 5min, to be defined) to a Huawei modem.
I think it was a good idea to save Connection object and reuse among calls to Huawei api.
Looking at source code I noticed I need/can freely call user.login() api before api access to ensure a proper login session is established.
But calling login() after a while from last api access with an already established Connection object raise ResponseErrorLoginRequiredException, which I can't undestand: I'm trying to login, and you tell me I need to login? :)
By the way, what is the the best approach supported by this library? Creating and discarding the Connection object every time, maybe often? There is a supported way to "resurrect" a previously used Connection object and ensure has a valid login context?
The text was updated successfully, but these errors were encountered: