Skip to content

Commit

Permalink
refactor: delegate param checking to invite creator
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
  • Loading branch information
dbluhm committed Apr 4, 2024
1 parent c446f0a commit 6c2d2b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 5 additions & 0 deletions aries_cloudagent/protocols/out_of_band/v1_0/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ def __init__(
)

if create_unique_did and not use_did_method:
LOGGER.error(
"create_unique_did: `%s`, use_did_method: `%s`",
create_unique_did,
use_did_method,
)
raise OutOfBandManagerError(
"create_unique_did can only be used with use_did_method"
)
Expand Down
5 changes: 0 additions & 5 deletions aries_cloudagent/protocols/out_of_band/v1_0/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,6 @@ async def invitation_create(request: web.BaseRequest):
auto_accept = json.loads(request.query.get("auto_accept", "null"))
create_unique_did = json.loads(request.query.get("create_unique_did", "false"))

if create_unique_did and use_public_did:
raise web.HTTPBadRequest(
reason="create_unique_did cannot be used with use_public_did"
)

profile = context.profile

oob_mgr = OutOfBandManager(profile)
Expand Down

0 comments on commit 6c2d2b2

Please sign in to comment.