buzzfeed / sso

sso, aka S.S.Octopus, aka octoboi, is a single sign-on solution for securing internal services
MIT License
3.07k stars 187 forks source link

sessions pkg: minor refactors #322

Closed Jusshersmith closed 2 years ago

Jusshersmith commented 2 years ago

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:

codecov[bot] commented 2 years ago

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%) :arrow_down:
internal/proxy/providers/sso.go 68.89% <69.23%> (+0.99%) :arrow_up:
internal/auth/providers/group_cache.go 57.14% <0.00%> (-11.28%) :arrow_down:
internal/auth/logging_handler.go 28.12% <0.00%> (-2.07%) :arrow_down:
internal/proxy/logging_handler.go 14.75% <0.00%> (-1.58%) :arrow_down:
internal/pkg/httpserver/httpserver.go 66.66% <0.00%> (-1.20%) :arrow_down:
internal/auth/providers/google.go 58.49% <0.00%> (-0.66%) :arrow_down:
internal/auth/error.go 72.22% <0.00%> (-0.51%) :arrow_down:
internal/auth/mux.go 74.54% <0.00%> (-0.46%) :arrow_down:
... 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.