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

Sessions #412

Merged
merged 4 commits into from
Feb 16, 2024
Merged

Sessions #412

merged 4 commits into from
Feb 16, 2024

Conversation

Jyyjy
Copy link
Contributor

@Jyyjy Jyyjy commented Feb 13, 2024

  1. Git ignores the build. It makes PR's harder, and the build can still be included in release tags as artifacts.
  2. Adds httpSessionId and browserSessionID.
  • Http session is essentially the same as sessionId, but is crypto-graphically unique.
  • sessionId is left as is for users to set the application specific session id. In a 3.0.0 release, we can rename sessionId to serverSessionId and set the default to null. Or remove it entirely and allow users to set it as a custom field.
  • browserSessionID is null be default unless using the web ext.
  1. The background script attempts to remap the session id's of tab events so they match the target tab's events. However some tab events happen before userale is initialized (e.g. tabs.onCreated). I'm sure there's a clever solution, but I'll leave that as a future issue.

@EandrewJones EandrewJones self-requested a review February 14, 2024 00:58
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I am following this code.

Nonetheless, I'm ripping off the band-aid. It's time to add Doc strings top each function.

updateConfig(res);
browserSessionId = JSON.parse(window.sessionStorage.getItem('userAleHttpSessionId'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the only place where the browserSessionId is set?

Why does this come from userAleHTTPSessionId?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it is the only place, and it comes from userAleHTTPSessionId because browser session is equivalent to the http session of the background page.

@EandrewJones EandrewJones merged commit c839132 into apache:test Feb 16, 2024
2 checks passed
@Jyyjy Jyyjy deleted the sessions branch February 17, 2024 22:45
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

Successfully merging this pull request may close these issues.

2 participants