Harden Sigil: sigil/__init__.py
This commit is contained in:
parent
e894d838a5
commit
05e376f5a2
@ -11,9 +11,12 @@ without the private key, which never leaves the agent.
|
|||||||
chal = identity.challenge(store, "bigpickle")
|
chal = identity.challenge(store, "bigpickle")
|
||||||
signed = keys.sign(private, chal["nonce"].encode())
|
signed = keys.sign(private, chal["nonce"].encode())
|
||||||
session = identity.verify(store, chal["nonce"], b64(signed))
|
session = identity.verify(store, chal["nonce"], b64(signed))
|
||||||
|
# -> {"token": ..., "kind": "agent", ...}
|
||||||
|
|
||||||
# A human looking at the same things, through the agent
|
# A human looking at the same things, through the agent.
|
||||||
code = viewcodes.issue_code(store, "bigpickle")
|
# issue_code takes the agent session, not a name, so a caller cannot mint
|
||||||
|
# authority for an agent it has not proven it is.
|
||||||
|
code = viewcodes.issue_code(store, session["token"])
|
||||||
view = viewcodes.redeem_code(store, code["code"])
|
view = viewcodes.redeem_code(store, code["code"])
|
||||||
|
|
||||||
# And the rule that holds it together
|
# And the rule that holds it together
|
||||||
@ -24,7 +27,7 @@ without the private key, which never leaves the agent.
|
|||||||
from . import errors, identity, keys, sessions, store, viewcodes
|
from . import errors, identity, keys, sessions, store, viewcodes
|
||||||
from .store import Store
|
from .store import Store
|
||||||
|
|
||||||
__version__ = "0.1.0"
|
__version__ = "0.2.0"
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"Store",
|
"Store",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user