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

[MNT-24628] Handle difference between config object and browser storage ticket #10270

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

tiagosalvado10
Copy link
Contributor

@tiagosalvado10 tiagosalvado10 commented Oct 3, 2024

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (check one with "x")

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation
  • Other... Please describe:

What is the current behaviour? (You can also link to an open issue here)

Following the steps from MNT-24628 we end up having different tickets in the client config object and browser local storage - where the ticket from config object is causing a 401 error. If the ticket from browser storage is used the request is successful.

What is the new behaviour?

The function AlfrescoApiClient.getAlfTicket(string) is now checking if tickets are different, if so, returns the ticket from browser storage and emits an event to initialize the API client and auth objects with the new ticket.

The second time the function is called, the config object will contain the correct ticket (i.e. equals to the storage one) and the request will work.

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

@tiagosalvado10
Copy link
Contributor Author

Added unit tests.

Copy link

sonarcloud bot commented Oct 7, 2024

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.

1 participant