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

Improve logout #1366

Merged
merged 15 commits into from
May 7, 2019
Merged

Improve logout #1366

merged 15 commits into from
May 7, 2019

Conversation

bjoernricks
Copy link
Contributor

@bjoernricks bjoernricks commented May 6, 2019

Checklist:

@bjoernricks bjoernricks marked this pull request as ready for review May 6, 2019 13:30
@bjoernricks bjoernricks requested a review from a team May 6, 2019 13:30
Add different function to Gmp object to allow an active logout by a
user. The passive logout will be called for session timeout.
@codecov
Copy link

codecov bot commented May 6, 2019

Codecov Report

Merging #1366 into gsa-8.0 will increase coverage by 1.07%.
The diff coverage is 72.72%.

Impacted file tree graph

@@             Coverage Diff             @@
##           gsa-8.0    #1366      +/-   ##
===========================================
+ Coverage    34.78%   35.85%   +1.07%     
===========================================
  Files          959      959              
  Lines        21635    21637       +2     
  Branches      5969     5996      +27     
===========================================
+ Hits          7526     7759     +233     
+ Misses       12765    12541     -224     
+ Partials      1344     1337       -7
Impacted Files Coverage Δ
gsa/src/gmp/http/rejection.js 100% <ø> (+100%) ⬆️
gsa/src/web/authorized.js 3.7% <ø> (+0.13%) ⬆️
gsa/src/gmp/http/http.js 10.63% <0%> (+8.44%) ⬆️
gsa/src/web/components/bar/titlebar.js 77.27% <0%> (ø) ⬆️
gsa/src/web/store/entities/utils/reducers.js 97.26% <100%> (+0.2%) ⬆️
gsa/src/gmp/gmp.js 77.61% <100%> (+76.14%) ⬆️
gsa/src/gmp/commands/tasks.js 31.5% <0%> (+2.73%) ⬆️
gsa/src/gmp/commands/wizard.js 9.23% <0%> (+3.07%) ⬆️
gsa/src/gmp/commands/users.js 9.09% <0%> (+3.63%) ⬆️
gsa/src/gmp/commands/scanconfigs.js 10.3% <0%> (+4.12%) ⬆️
... and 38 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4aa8732...191e5e6. Read the comment docs.

@bjoernricks
Copy link
Contributor Author

Requires #1367 to be merged

bjoernricks and others added 11 commits May 7, 2019 09:20
Only isError is used currently.
Add a REASON_UNAUTHORIZED class variable to Rejection.
Set rejection reason to unauthorized if http status was 401.
Always pass a rejection if an http error had occurred. If the error
couldn't be transformed e.g. due to unexpected or invalid xml ensure to
only log the error and return the original rejection.
Expected errors are rejections caused by being unauthorized, cancelation
or timeouts.
The token will be cleared when calling gmp.logout now.
gsa/src/gmp/http/http.js Outdated Show resolved Hide resolved
gsa/src/web/store/entities/utils/reducers.js Outdated Show resolved Hide resolved
Co-Authored-By: bjoernricks <bjoern.ricks@gmail.com>
@swaterkamp swaterkamp merged commit f9504f9 into greenbone:gsa-8.0 May 7, 2019
@bjoernricks bjoernricks deleted the improve-logout branch May 7, 2019 07:53
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