auth¤
Functions and classes used for ZeroMQ authentication.
load_certificate
¤
Load public and secret keys from a ZeroMQ certificate file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
PathLike
|
The path to a certificate file. Can include |
required |
Returns:
| Type | Description |
|---|---|
tuple[bytes, bytes | None]
|
The |
Source code in src/msl/network/auth.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
AuthCurve
¤
CURVE authentication credentials to connect to a Broker.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
public_key
|
bytes
|
required | |
secret_key
|
bytes
|
required | |
broker_key
|
bytes
|
The public key of the Broker. |
required |
Source code in src/msl/network/auth.py
102 103 104 105 106 107 108 109 110 111 112 | |
load
staticmethod
¤
Load CURVE authentication credentials from files.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
broker
|
PathLike
|
The path to the file that contains the Broker's public key.
Can include |
required |
own
|
PathLike | None
|
None
|
Returns:
| Type | Description |
|---|---|
AuthCurve
|
The CURVE credentials. |
Source code in src/msl/network/auth.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | |
AuthPlain
¤
PLAIN authentication credentials to connect to a Broker.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
username
|
str | bytes
|
The username registered with the Broker. |
required |
password
|
str | bytes
|
The password registered with the Broker. |
required |
Source code in src/msl/network/auth.py
39 40 41 42 43 44 45 46 47 | |
load
staticmethod
¤
Load PLAIN authentication credentials from a file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
PathLike | None
|
The path to load the credentials from. If the path has the |
None
|
sep
|
str | None
|
If the |
None
|
Returns:
| Type | Description |
|---|---|
AuthPlain
|
The PLAIN credentials. |
Source code in src/msl/network/auth.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | |