mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-10-18 04:47:28 +00:00
General improvements and tests related fixes.
This commit is contained in:
@@ -16,11 +16,6 @@ import (
|
||||
"golang.org/x/time/rate"
|
||||
)
|
||||
|
||||
// MockTokenVerifier implements the TokenVerifier interface for testing
|
||||
type MockTokenVerifier struct {
|
||||
VerifyFunc func(token string) error
|
||||
}
|
||||
|
||||
// MockJWTVerifier implements the JWTVerifier interface for testing
|
||||
type MockJWTVerifier struct {
|
||||
VerifyJWTFunc func(jwt *JWT, token string) error
|
||||
@@ -33,13 +28,6 @@ func (m *MockJWTVerifier) VerifyJWTSignatureAndClaims(jwt *JWT, token string) er
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MockTokenVerifier) VerifyToken(token string) error {
|
||||
if m.VerifyFunc != nil {
|
||||
return m.VerifyFunc(token)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func TestGoogleOIDCRefreshTokenHandling(t *testing.T) {
|
||||
// Create a mocked TraefikOidc instance that simulates Google provider behavior
|
||||
mockLogger := NewLogger("debug")
|
||||
|
||||
Reference in New Issue
Block a user