feat(security): add support for query modes in TOTP provider
CI / build-and-test (push) Successful in 1m33s
CI / build-and-test (push) Successful in 1m33s
* Introduced QueryMode to select between stored procedure and direct SQL execution. * Implemented dbCapability to check for stored procedure existence. * Added methods to DatabaseTwoFactorProvider for configuring table names and query modes. * Created direct SQL implementations for TOTP operations to handle cases where stored procedures are not available. * Updated existing TOTP methods to utilize the new query mode logic.
This commit is contained in:
+2
-2
@@ -74,8 +74,8 @@ func (c *CompositeSecurityProvider) GetColumnSecurity(ctx context.Context, userI
|
||||
}
|
||||
|
||||
// GetRowSecurity delegates to the row security provider
|
||||
func (c *CompositeSecurityProvider) GetRowSecurity(ctx context.Context, userID int, schema, table string) (RowSecurity, error) {
|
||||
return c.rowSec.GetRowSecurity(ctx, userID, schema, table)
|
||||
func (c *CompositeSecurityProvider) GetRowSecurity(ctx context.Context, userRef any, schema, table string) (RowSecurity, error) {
|
||||
return c.rowSec.GetRowSecurity(ctx, userRef, schema, table)
|
||||
}
|
||||
|
||||
// Optional interface implementations (if wrapped providers support them)
|
||||
|
||||
Reference in New Issue
Block a user