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 pkg: minor refactors #322

Merged
merged 1 commit into from
Sep 3, 2021

Conversation

Jusshersmith
Copy link
Contributor

Problem

In an effort to reduce the scale of some other changes I'm trying to pull through, we make some small refactors here to internal/proxy/providers/sso.go.

Solution

Included refactors are:

  • Pull out the withinGracePeriod method within internal/proxy/providers/sso.go into a new method within the sessions package: IsWithinGracePeriod.
  • Instead of calling a local extendDeadline function within internal/proxy/providers/sso.go, call the already existing sessions package ExtendDeadline method.

@codecov
Copy link

codecov bot commented Aug 5, 2021

Codecov Report

Merging #322 (d2371e9) into main (a1b1b74) will increase coverage by 0.20%.
The diff coverage is 64.70%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #322      +/-   ##
==========================================
+ Coverage   62.73%   62.94%   +0.20%     
==========================================
  Files          58       58              
  Lines        4286     4758     +472     
==========================================
+ Hits         2689     2995     +306     
- Misses       1382     1546     +164     
- Partials      215      217       +2     
Impacted Files Coverage Δ
internal/pkg/sessions/session_state.go 79.16% <50.00%> (-5.45%) ⬇️
internal/proxy/providers/sso.go 68.89% <69.23%> (+0.99%) ⬆️
internal/auth/providers/group_cache.go 57.14% <0.00%> (-11.28%) ⬇️
internal/auth/logging_handler.go 28.12% <0.00%> (-2.07%) ⬇️
internal/proxy/logging_handler.go 14.75% <0.00%> (-1.58%) ⬇️
internal/pkg/httpserver/httpserver.go 66.66% <0.00%> (-1.20%) ⬇️
internal/auth/providers/google.go 58.49% <0.00%> (-0.66%) ⬇️
internal/auth/error.go 72.22% <0.00%> (-0.51%) ⬇️
internal/auth/mux.go 74.54% <0.00%> (-0.46%) ⬇️
... and 48 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 a1b1b74...d2371e9. Read the comment docs.

Copy link

@laurenzhang laurenzhang left a comment

Choose a reason for hiding this comment

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

these changes lgtm!

@Jusshersmith Jusshersmith merged commit d473b35 into main Sep 3, 2021
@Jusshersmith Jusshersmith deleted the jusshersmith-refactor-session-methods branch September 3, 2021 15:38
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