diff --git a/sigil/__init__.py b/sigil/__init__.py index b96f3e4..24c1382 100644 --- a/sigil/__init__.py +++ b/sigil/__init__.py @@ -11,9 +11,12 @@ without the private key, which never leaves the agent. chal = identity.challenge(store, "bigpickle") signed = keys.sign(private, chal["nonce"].encode()) session = identity.verify(store, chal["nonce"], b64(signed)) + # -> {"token": ..., "kind": "agent", ...} - # A human looking at the same things, through the agent - code = viewcodes.issue_code(store, "bigpickle") + # A human looking at the same things, through the agent. + # 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"]) # 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 .store import Store -__version__ = "0.1.0" +__version__ = "0.2.0" __all__ = [ "Store",