Skip to content
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

Ticket timeout #2

Open
mrichez-saluc opened this issue Jun 30, 2020 · 3 comments
Open

Ticket timeout #2

mrichez-saluc opened this issue Jun 30, 2020 · 3 comments

Comments

@mrichez-saluc
Copy link
Contributor

Hi Axel,

I'm using your client to develop an alfresco gui search. I do the login on Alfresco when launching the program then i'm using the Client object returned by the connect method. But seems after some inactivity (1hour), ticket is invalid... So wondering how to refresh authentication... ticket is a private attribute in the Client object.

So wondering if this line should be outside the if block to check if ticket is still valid:

self.__updateTicket()

Thanks for help!

@mrichez-saluc
Copy link
Contributor Author

Don't see any change when putting line outside the block (so bad idea). Maybe adding a public method on Client to refresh ticket ?
In connect method, ticket is a parameter, but Client model doesn't give a method or attribute to get ticket to use it later.

@AFaust
Copy link
Member

AFaust commented Jul 1, 2020

I had not considered the use of the library for long running, idle processes that may run into such an issue. What I could see is a config option to specify a ticketRefreshIfIdle timeout. Since the client is a central component to execute requests, it can track when the last request was performed, and proactively try to obtain a new ticket if it was too far in the past. It would only require that the user/password details are kept alive after connect() to support the refresh handling - and it would not work if the initial connect was performed with a pre-established ticket.

@mrichez-saluc
Copy link
Contributor Author

Thanks for your answer, we solve this problem by extending duration of authentication ticket in global properties of Alfresco.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants