-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathagentController.py
67 lines (55 loc) · 1.73 KB
/
agentController.py
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
class ApplicationData:
userName = ""
password = ""
firstName = ""
lastName = ""
passportNumber = ""
dateOfBirth = ""
permitNumber = ""
permitExpiry = ""
class AgentCommunication:
CommunicationTxBuffer = ""
CommunicationRxBuffer = ""
CommunicationFlag = False
CommunicationError = False
userAgentUserID = "[email protected]"
userAgentPassword = "agent@123"
jwtAgentUserId = "[email protected]"
jwtAgentPassword = "agent@123"
sinGeneratorAgentUserId = "[email protected]"
sinGeneratorAgentPasswordId = "agent@123"
verificationAgentUserId = "[email protected]"
verificationAgentPasswordId = "agent@123"
databaseAgentUserId = "[email protected]"
databaseAgentPasswordId = "agent@123"
# Command IDs
UserCreateJwtCommandId = "2"
UserCreateVerificationCommandId = "3"
UserCreateDatabaseCommandId = "4"
UserCreateSinCommandId = "5"
# Agent IDs
userAgentID = "1"
jwtAgentID = "2"
verificationAgentID = "3"
databaseAgentID = "4"
sinAgentId = "5"
# Error Codes
SuccessAckID = "0"
# Protocol Format
ReceiverAgentIDIndex = 1
class DatabaseAgentData:
encoded_jwt = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InRlc3RAdXNlci5jb20iLCJwYXNzd29yZCI6InNvbWVTYWx0VmFsdWV0ZXN0In0.JyFt5w5AdBIH0CabY_b71ThqZsj_SDfG--8YUB04QW0"
class JWT:
# jwt salt
salt = "someSaltValue"
# jwt secret
secret = "someSecretValue"
from Agent import jwt_agent
from Agent import sin_agent
from Agent import verification_agent
from Agent import database_agent
def StartAgents():
jwt_agent.JwtAgentStart()
sin_agent.SinGeneratorAgentStart()
verification_agent.VerificationAgentStart()
database_agent.DatabaseAgentStart()