Updated Login Module.
- OAUTH LOGIN: is generic based on a new OAUTH_20_GENERIC_API
- Storage (at the moment only SQL) for OAUTH_CONSUMER configuration.
- OAUTH login and callback are generic.
- Added a OAUTH_20_GENERIC_API.
- Added scripts and templates to build the new OAUTH tables.
- Fixed CMS_STORAGE_SQL_I.check_sql_query_validity issue.
- Extended CMS_STORAGE_SQL_I, to execute scripts with paramerters.
- Updated filter, now it's generic for every OAUTH consumer.
This commit is contained in:
@@ -76,7 +76,7 @@ feature -- Operation
|
||||
i := a_sql_statement.index_of (':', i)
|
||||
if i = 0 then
|
||||
i := n -- exit
|
||||
else
|
||||
elseif a_sql_statement.at (i-1).is_equal ('%'') or else a_sql_statement.at (i-1).is_equal ('%"') or else a_sql_statement.at (i-1).is_equal (' ') or else a_sql_statement.at (i-1).is_equal ('=') then
|
||||
from
|
||||
j := i + 1
|
||||
until
|
||||
@@ -124,6 +124,30 @@ feature -- Operation
|
||||
|
||||
feature -- Helper
|
||||
|
||||
sql_execute_file_script_with_params (a_path: PATH; a_params: detachable STRING_TABLE [detachable ANY])
|
||||
-- Execute SQL script from `a_path' and with params `a_params'.
|
||||
local
|
||||
f: PLAIN_TEXT_FILE
|
||||
sql: STRING
|
||||
do
|
||||
create f.make_with_path (a_path)
|
||||
if f.exists and then f.is_access_readable then
|
||||
create sql.make (f.count)
|
||||
f.open_read
|
||||
from
|
||||
f.start
|
||||
until
|
||||
f.exhausted or f.end_of_file
|
||||
loop
|
||||
f.read_stream_thread_aware (1_024)
|
||||
sql.append (f.last_string)
|
||||
end
|
||||
f.close
|
||||
sql_execute_script_with_params (sql, a_params)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
sql_execute_file_script (a_path: PATH)
|
||||
-- Execute SQL script from `a_path'.
|
||||
local
|
||||
@@ -157,6 +181,14 @@ feature -- Helper
|
||||
-- sql_commit_transaction
|
||||
end
|
||||
|
||||
sql_execute_script_with_params (a_sql_script: STRING; a_params: detachable STRING_TABLE [detachable ANY])
|
||||
-- Execute SQL script.
|
||||
-- i.e: multiple SQL statements.
|
||||
do
|
||||
reset_error
|
||||
sql_change (a_sql_script, a_params)
|
||||
end
|
||||
|
||||
sql_table_exists (a_table_name: READABLE_STRING_8): BOOLEAN
|
||||
-- Does table `a_table_name' exists?
|
||||
local
|
||||
|
||||
Reference in New Issue
Block a user