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

Invalidate session.properties if config file is updated #3

Closed
cwarden opened this issue Jul 8, 2014 · 4 comments
Closed

Invalidate session.properties if config file is updated #3

cwarden opened this issue Jul 8, 2014 · 4 comments

Comments

@cwarden
Copy link

cwarden commented Jul 8, 2014

getSavedConnectionData shouldn't return the cached sessionId and serviceEndpoint from session.properties if the config file is newer than the session.properties. When the config file is updated, it should invalidate the session info, and a new session should be started using the current config file.

@neowit
Copy link
Owner

neowit commented Jul 9, 2014

Hi Christian,

I am guessing that you use config file only for login credentials?
tooling-force.com config file does not have to be limited to login credentials only and can contain any other parameters. Also, login credentials can be passed directly via command line, without a config file.

Perhaps a better option would be to hash login/pass/url combination and store it in session.properties. This way tooling-force.com could check the hash every time it tries to re-use existing session Id to see if that Id is still valid relatively current login attributes.

What do you think?

@cwarden
Copy link
Author

cwarden commented Jul 10, 2014

I had only been using it for credentials and login url, which is why I suggested using modification date. Hashing the credentials and url, whether from the config file or command line arguments, sounds like an even better solution.

neowit added a commit that referenced this issue Jul 10, 2014
@neowit
Copy link
Owner

neowit commented Jul 10, 2014

check v0.1.4.3 to see if it works for your use case.

@cwarden
Copy link
Author

cwarden commented Jul 11, 2014

You had me scratching my head thinking 9b507e9 was the only change you made.

cac400b...9b507e9 indeed fixes the problem. Thanks!

@cwarden cwarden closed this as completed Jul 11, 2014
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