mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2025-12-31 08:44:25 +00:00
Fixed formatting issues
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -377,4 +377,3 @@ func (a *DatabaseAuthenticatorExample) RefreshToken(ctx context.Context, refresh
|
||||
ExpiresIn: int64(24 * time.Hour.Seconds()),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -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 ""
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user