-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
74 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v1.4.0 | ||
v1.5.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
-------------------------------------------------------------------------------- | ||
-- Accenture, Data Platforms | ||
-- Saegereistrasse 29, 8152 Glattbrugg, Switzerland | ||
-------------------------------------------------------------------------------- | ||
-- Name......: sssec_pwverify_test.sql | ||
-- Author....: Stefan Oehrli (oes) [email protected] | ||
-- Editor....: Stefan Oehrli | ||
-- Date......: 2023.12.12 | ||
-- Usage.....: | ||
-- Purpose...: Test the password verify function | ||
-- Notes.....: | ||
-- Reference.: | ||
-- License...: Apache License Version 2.0, January 2004 as shown | ||
-- at http://www.apache.org/licenses/ | ||
-------------------------------------------------------------------------------- | ||
|
||
-------------------------------------------------------------------------------- | ||
-- create a temporary type | ||
CREATE OR REPLACE TYPE table_varchar AS | ||
TABLE OF VARCHAR2(128) | ||
/ | ||
|
||
-------------------------------------------------------------------------------- | ||
-- Anonymous PL/SQL Block to test the password function | ||
DECLARE | ||
username VARCHAR2(100) := 'john_doe'; | ||
old_password VARCHAR2(100) := 'OldPass123'; | ||
test_passwords table_varchar := table_varchar( | ||
'NewPass123!', | ||
'short', | ||
'NewPassword12nnewpassword123', | ||
'newpassword12nnewpassword123', | ||
'NewPassword12n-dwpassword123', | ||
'verylongpasswordthatexceedsthemaximumlength', | ||
'NoDigit123', | ||
'nodigitOrSpecialChar', | ||
'john_doePass'); | ||
result BOOLEAN; | ||
BEGIN | ||
FOR i IN 1..test_passwords.COUNT LOOP | ||
BEGIN | ||
result := oradba_verify_function(username, test_passwords(i), old_password); | ||
IF result THEN | ||
DBMS_OUTPUT.PUT_LINE('Password "' || test_passwords(i) || '" is valid.'); | ||
ELSE | ||
DBMS_OUTPUT.PUT_LINE('Password "' || test_passwords(i) || '" is invalid.'); | ||
END IF; | ||
EXCEPTION | ||
WHEN OTHERS THEN | ||
DBMS_OUTPUT.PUT_LINE('Error with password "' || test_passwords(i) || '": ' || SQLERRM); | ||
END; | ||
END LOOP; | ||
END; | ||
/ | ||
|
||
-------------------------------------------------------------------------------- | ||
-- drop temporary created type | ||
DROP TYPE table_varchar | ||
/ | ||
-- EOF ------------------------------------------------------------------------- |