I think nip42 is FINALLY working.
This commit is contained in:
@@ -407,12 +407,12 @@ test_nip42_authentication() {
|
||||
|
||||
# Test NIP-42 configuration modes
|
||||
test_nip42_configuration() {
|
||||
# Check NIP-42 mode in database using unified config table
|
||||
local nip42_mode=$(sqlite3 "$DB_PATH" "SELECT value FROM config WHERE key = 'require_nip42_auth';" 2>/dev/null || echo "")
|
||||
# Check NIP-42 mode in database using unified config table (updated key name)
|
||||
local nip42_mode=$(sqlite3 "$DB_PATH" "SELECT value FROM config WHERE key = 'nip42_require_auth';" 2>/dev/null || echo "")
|
||||
|
||||
if [[ -n "$nip42_mode" ]]; then
|
||||
case "$nip42_mode" in
|
||||
"true"|"false")
|
||||
"true"|"false"|"optional"|"required"|"disabled")
|
||||
record_test_result "NIP-42 Configuration Check" "VALID" "VALID" "true"
|
||||
;;
|
||||
*)
|
||||
@@ -422,6 +422,16 @@ test_nip42_configuration() {
|
||||
else
|
||||
record_test_result "NIP-42 Configuration Check" "VALID" "DEFAULT" "true"
|
||||
fi
|
||||
|
||||
# Also check that the other NIP-42 config keys exist
|
||||
local timeout=$(sqlite3 "$DB_PATH" "SELECT value FROM config WHERE key = 'nip42_challenge_timeout';" 2>/dev/null || echo "")
|
||||
local tolerance=$(sqlite3 "$DB_PATH" "SELECT value FROM config WHERE key = 'nip42_time_tolerance';" 2>/dev/null || echo "")
|
||||
|
||||
if [[ -n "$timeout" && -n "$tolerance" ]]; then
|
||||
record_test_result "NIP-42 Config Keys Check" "VALID" "VALID" "true"
|
||||
else
|
||||
record_test_result "NIP-42 Config Keys Check" "VALID" "PARTIAL" "true"
|
||||
fi
|
||||
}
|
||||
|
||||
# Test dual authentication capability
|
||||
|
||||
Reference in New Issue
Block a user