mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-10-14 04:07:46 +00:00
Cleanup [dec2025] (#101)
* Cleanup excessive comments. * Remove leftovers hanging around from previous refactor * Improve test coverage
This commit is contained in:
@@ -152,7 +152,6 @@ func (ts *TestSuite) Setup() {
|
||||
metadataRefreshStopChan: make(chan struct{}),
|
||||
}
|
||||
close(ts.tOidc.initComplete)
|
||||
// ts.tOidc.exchangeCodeForTokenFunc = ts.exchangeCodeForTokenFunc // Removed
|
||||
ts.tOidc.tokenVerifier = ts.tOidc
|
||||
ts.tOidc.jwtVerifier = ts.tOidc
|
||||
// Set default mock exchanger
|
||||
@@ -1183,14 +1182,6 @@ func TestHandleCallback(t *testing.T) {
|
||||
RefreshToken: "test-refresh-token-disallowed",
|
||||
}, nil
|
||||
},
|
||||
// Remove mock extractClaimsFunc - let the real one parse the disallowedToken
|
||||
// The test should still fail correctly on the email check later.
|
||||
// extractClaimsFunc: func(tokenString string) (map[string]interface{}, error) {
|
||||
// return map[string]interface{}{
|
||||
// "email": "[email protected]",
|
||||
// "nonce": "test-nonce",
|
||||
// }, nil
|
||||
// },
|
||||
sessionSetupFunc: func(session *SessionData) {
|
||||
session.SetCSRF("test-csrf-token")
|
||||
session.SetNonce("test-nonce")
|
||||
@@ -1891,7 +1882,6 @@ func TestHandleLogout(t *testing.T) {
|
||||
tOidc := &TraefikOidc{
|
||||
revocationURL: mockRevocationServer.URL,
|
||||
endSessionURL: tc.endSessionURL,
|
||||
scheme: "http",
|
||||
logger: logger,
|
||||
tokenBlacklist: NewCache(), // Use generic cache for blacklist
|
||||
httpClient: &http.Client{},
|
||||
|
||||
Reference in New Issue
Block a user