Skip to content

Commit

Permalink
Align with changes in dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
prwater committed Sep 22, 2024
1 parent 4961de4 commit dd54b57
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 63 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
/.idea/
/.phpunit.result.cache
/.phpunit.cache/
/bin/
/composer.lock
/custom.task.properties
/custom.type.properties
/test/TestDataLayer.php
/test/coverage.xml
/test/etc/columns.txt
Expand Down
12 changes: 5 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,15 @@
"plaisio/kernel": "^3.2.1",
"plaisio/login-handler": "^1.3.0",
"plaisio/login-requirement": "^1.2.0",
"plaisio/session": "^5.0.0"
"plaisio/session": "^5.0.0",
"setbased/php-stratum-mysql": "^7.0.0"
},
"minimum-stability": "dev",
"prefer-stable": true,
"require-dev": {
"phing/phing": "^3.0.0-RC4",
"phpunit/phpunit": "^9.6.3",
"phing/phing": "^3.0.0",
"phpunit/phpunit": "^10.5.35",
"plaisio/console-kernel": "^1.0.1",
"plaisio/request-core": "^0.13.0",
"setbased/php-stratum": "^6.3.1",
"setbased/php-stratum-mysql": "^6.6.0"
"setbased/php-stratum": "^6.3.1"
},
"autoload": {
"psr-4": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,30 @@
*
* @type none
*/
create procedure abc_login_handler_core_log_login(in p_cmp_id @abc_auth_login_log.cmp_id%type@,
in p_ses_id @abc_auth_login_log.ses_id%type@,
in p_usr_id @abc_auth_login_log.usr_id%type@,
in p_lgr_id @abc_auth_login_log.lgr_id%type@,
in p_llg_user_name @abc_auth_login_log.llg_user_name%type@,
in p_llg_ip @abc_auth_login_log.llg_ip%type@ )
modifies sql data
create procedure abc_login_handler_core_log_login
(
in p_cmp_id smallint(5) unsigned, -- type: ABC_AUTH_LOGIN_LOG.cmp_id
in p_ses_id int(10) unsigned, -- type: ABC_AUTH_LOGIN_LOG.ses_id
in p_usr_id int(10) unsigned, -- type: ABC_AUTH_LOGIN_LOG.usr_id
in p_lgr_id tinyint(3) unsigned, -- type: ABC_AUTH_LOGIN_LOG.lgr_id
in p_llg_user_name varchar(64) character set utf8mb3, -- type: ABC_AUTH_LOGIN_LOG.llg_user_name
in p_llg_ip binary(16) -- type: ABC_AUTH_LOGIN_LOG.llg_ip
)
modifies sql data
begin
-- Log the login attempt in the login specific log table.
insert into ABC_AUTH_LOGIN_LOG( cmp_id
, lgr_id
, ses_id
, usr_id
, llg_timestamp
, llg_user_name
, llg_ip )
values( p_cmp_id
, p_lgr_id
, p_ses_id
, p_usr_id
, now()
, p_llg_user_name
, p_llg_ip )
;
, lgr_id
, ses_id
, usr_id
, llg_timestamp
, llg_user_name
, llg_ip )
values ( p_cmp_id
, p_lgr_id
, p_ses_id
, p_usr_id
, now()
, p_llg_user_name
, p_llg_ip );
end
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
* @param p_lgr_id The ID the login response for a wrong password.
* @param p_interval The length of the interval in minutes.
*
* @type singleton1
*
* @return int
* @type singleton1 int
*/
create procedure abc_login_handler_core_wrong_password_by_usr_id_count(in p_cmp_id @abc_auth_login_log.cmp_id%type@,
in p_usr_id @abc_auth_login_log.usr_id%type@,
in p_lgr_id @abc_auth_login_log.lgr_id%type@,
in p_interval int)
modifies sql data
create procedure abc_login_handler_core_wrong_password_by_usr_id_count
(
in p_cmp_id smallint(5) unsigned, -- type: ABC_AUTH_LOGIN_LOG.cmp_id
in p_usr_id int(10) unsigned, -- type: ABC_AUTH_LOGIN_LOG.usr_id
in p_lgr_id tinyint(3) unsigned, -- type: ABC_AUTH_LOGIN_LOG.lgr_id
in p_interval int
)
modifies sql data
begin
select count(*)
from ABC_AUTH_LOGIN_LOG
where cmp_id = p_cmp_id
and usr_id = p_usr_id
and lgr_id = p_lgr_id
and llg_timestamp >= date_sub(now(), interval p_interval minute)
;
from ABC_AUTH_LOGIN_LOG
where cmp_id = p_cmp_id
and usr_id = p_usr_id
and lgr_id = p_lgr_id
and llg_timestamp >= date_sub(now(), interval p_interval minute);
end
40 changes: 22 additions & 18 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
<phpunit bootstrap="test/bootstrap.php">
<testsuites>
<testsuite name="Tests">
<directory>test</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
<exclude>
<directory suffix=".php">vendor/setbased</directory>
</exclude>
</whitelist>
</filter>
<logging>
<log type="coverage-html" target="test/report"/>
<log type="coverage-clover" target="test/coverage.xml"/>
</logging>
<?xml version="1.0"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="test/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache">
<coverage>
<report>
<clover outputFile="test/coverage.xml"/>
<html outputDirectory="test/report"/>
</report>
</coverage>
<testsuites>
<testsuite name="Tests">
<directory>test</directory>
</testsuite>
</testsuites>
<logging/>
<source>
<include>
<directory suffix=".php">src</directory>
</include>
<exclude>
<directory suffix=".php">vendor/setbased</directory>
</exclude>
</source>
</phpunit>

0 comments on commit dd54b57

Please sign in to comment.