← 实验室|🎙️ 身份认证系统 · 声波密码门
加载中
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
点击 ▶ 运行或按 Ctrl+Enter

🧪 代码原型观察器

Identity Auth Prototype

实验室只展示可修改的代码变量、判断链路和运行结果;完整开门应用放在进化舱。

当前代码运行结果

OPENED

pass_phrase

clean_text == "open sesame"

true

pass_voice

voice_score >= 80

true

pass_face

face_score >= 75

true

pass_role

role in ALLOWED_ROLES

true

not_locked

attempts < 3

true

实验室要观察的代码逻辑

改变左侧代码里的 `VOICE_THRESHOLD`、`FACE_THRESHOLD`、`ALLOWED_ROLES`,再运行;右侧这个原型用于理解变量如何影响 `door_state`。

clean_text = "open sesame"

phrase_ok = true

voice_score = 86

face_score = 82

role = "engineer"

permission_ok = true

door_state = "opened"

textvoicefacerolestate
open sesame8682engineeropened
wrong code5880visitordenied
open sesame9189adminopened