Fixed formatting issues
Some checks failed
Tests / Run Tests (1.23.x) (push) Has been cancelled
Tests / Run Tests (1.24.x) (push) Has been cancelled
Tests / Lint Code (push) Has been cancelled
Tests / Build (push) Has been cancelled

This commit is contained in:
Hein
2025-12-01 14:56:30 +02:00
parent 1643a5e920
commit 78029fb34f
10 changed files with 77 additions and 64 deletions

View File

@@ -9,9 +9,9 @@ import (
// CompositeSecurityProvider combines multiple security providers
// Allows separating authentication, column security, and row security concerns
type CompositeSecurityProvider struct {
auth Authenticator
colSec ColumnSecurityProvider
rowSec RowSecurityProvider
auth Authenticator
colSec ColumnSecurityProvider
rowSec RowSecurityProvider
}
// NewCompositeSecurityProvider creates a composite provider

View File

@@ -377,4 +377,3 @@ func (a *DatabaseAuthenticatorExample) RefreshToken(ctx context.Context, refresh
ExpiresIn: int64(24 * time.Hour.Seconds()),
}, nil
}

View File

@@ -192,7 +192,7 @@ func (a *DatabaseAuthenticator) updateSessionActivity(ctx context.Context, sessi
var updatedUserJSON []byte
query := `SELECT p_success, p_error, p_user FROM resolvespec_session_update($1, $2::jsonb)`
a.db.QueryRowContext(ctx, query, sessionToken, userJSON).Scan(&success, &errorMsg, &updatedUserJSON)
_ = a.db.QueryRowContext(ctx, query, sessionToken, userJSON).Scan(&success, &errorMsg, &updatedUserJSON)
}
// RefreshToken implements Refreshable interface
@@ -539,14 +539,14 @@ func generateRandomString(length int) string {
return string(b)
}
func getClaimString(claims map[string]any, key string) string {
if claims == nil {
return ""
}
if val, ok := claims[key]; ok {
if str, ok := val.(string); ok {
return str
}
}
return ""
}
// func getClaimString(claims map[string]any, key string) string {
// if claims == nil {
// return ""
// }
// if val, ok := claims[key]; ok {
// if str, ok := val.(string); ok {
// return str
// }
// }
// return ""
// }