mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-18 04:41:19 +02:00
@@ -7,18 +7,18 @@ import (
|
||||
|
||||
type NoOpLock struct{}
|
||||
|
||||
func (l *NoOpLock) Obtain(ctx context.Context, expiration time.Duration) error {
|
||||
func (l *NoOpLock) Obtain(_ context.Context, _ time.Duration) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *NoOpLock) Peek(ctx context.Context) (bool, error) {
|
||||
func (l *NoOpLock) Peek(_ context.Context) (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func (l *NoOpLock) Refresh(ctx context.Context, expiration time.Duration) error {
|
||||
func (l *NoOpLock) Refresh(_ context.Context, _ time.Duration) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *NoOpLock) Release(ctx context.Context) error {
|
||||
func (l *NoOpLock) Release(_ context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ type testVerifier struct {
|
||||
jwk jose.JSONWebKey
|
||||
}
|
||||
|
||||
func (t *testVerifier) VerifySignature(ctx context.Context, jwt string) ([]byte, error) {
|
||||
func (t *testVerifier) VerifySignature(_ context.Context, jwt string) ([]byte, error) {
|
||||
jws, err := jose.ParseSigned(jwt)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("oidc: malformed jwt: %v", err)
|
||||
|
||||
@@ -12,19 +12,19 @@ type MockLock struct {
|
||||
elapsed time.Duration
|
||||
}
|
||||
|
||||
func (l *MockLock) Obtain(ctx context.Context, expiration time.Duration) error {
|
||||
func (l *MockLock) Obtain(_ context.Context, expiration time.Duration) error {
|
||||
l.expiration = expiration
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *MockLock) Peek(ctx context.Context) (bool, error) {
|
||||
func (l *MockLock) Peek(_ context.Context) (bool, error) {
|
||||
if l.elapsed < l.expiration {
|
||||
return true, nil
|
||||
}
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func (l *MockLock) Refresh(ctx context.Context, expiration time.Duration) error {
|
||||
func (l *MockLock) Refresh(_ context.Context, expiration time.Duration) error {
|
||||
if l.expiration <= l.elapsed {
|
||||
return sessions.ErrNotLocked
|
||||
}
|
||||
@@ -33,7 +33,7 @@ func (l *MockLock) Refresh(ctx context.Context, expiration time.Duration) error
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *MockLock) Release(ctx context.Context) error {
|
||||
func (l *MockLock) Release(_ context.Context) error {
|
||||
if l.expiration <= l.elapsed {
|
||||
return sessions.ErrNotLocked
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ func validateHeader(header options.Header, names map[string]struct{}) []string {
|
||||
return msgs
|
||||
}
|
||||
|
||||
func validateHeaderValue(name string, value options.HeaderValue) []string {
|
||||
func validateHeaderValue(_ string, value options.HeaderValue) []string {
|
||||
switch {
|
||||
case value.SecretSource != nil && value.ClaimSource == nil:
|
||||
return []string{validateSecretSource(*value.SecretSource)}
|
||||
|
||||
Reference in New Issue
Block a user