aries_cloudagent.protocols.out_of_band.v1_0 package¶
Subpackages¶
- aries_cloudagent.protocols.out_of_band.v1_0.handlers package
- aries_cloudagent.protocols.out_of_band.v1_0.messages package
- Submodules
- aries_cloudagent.protocols.out_of_band.v1_0.messages.invitation module
- aries_cloudagent.protocols.out_of_band.v1_0.messages.problem_report module
- aries_cloudagent.protocols.out_of_band.v1_0.messages.reuse module
- aries_cloudagent.protocols.out_of_band.v1_0.messages.reuse_accept module
- aries_cloudagent.protocols.out_of_band.v1_0.messages.service module
- aries_cloudagent.protocols.out_of_band.v1_0.models package
Submodules¶
aries_cloudagent.protocols.out_of_band.v1_0.manager module¶
Classes to manage connections.
-
class
aries_cloudagent.protocols.out_of_band.v1_0.manager.
OutOfBandManager
(session: aries_cloudagent.core.profile.ProfileSession)[source]¶ Bases:
aries_cloudagent.connections.base_manager.BaseConnectionManager
Class for managing out of band messages.
-
check_reuse_msg_state
(conn_rec: aries_cloudagent.connections.models.conn_record.ConnRecord)[source]¶ Check reuse message state from the ConnRecord Metadata.
Parameters: conn_rec – The required ConnRecord with updated metadata Returns:
-
create_handshake_reuse_message
(invi_msg: aries_cloudagent.protocols.out_of_band.v1_0.messages.invitation.InvitationMessage, conn_record: aries_cloudagent.connections.models.conn_record.ConnRecord) → None[source]¶ Create and Send a Handshake Reuse message under RFC 0434.
Parameters: - invi_msg – OOB Invitation Message
- service – Service block extracted from the OOB invitation
Returns:
Raises: OutOfBandManagerError
– If there is an issue creating or- sending the OOB invitation
-
create_invitation
(my_label: str = None, my_endpoint: str = None, auto_accept: bool = None, public: bool = False, hs_protos: Sequence[aries_cloudagent.protocols.out_of_band.v1_0.messages.invitation.HSProto] = None, multi_use: bool = False, alias: str = None, attachments: Sequence[Mapping[KT, VT_co]] = None, metadata: dict = None, mediation_id: str = None) → aries_cloudagent.protocols.out_of_band.v1_0.models.invitation.InvitationRecord[source]¶ Generate new connection invitation.
This interaction represents an out-of-band communication channel. In the future and in practice, these sort of invitations will be received over any number of channels such as SMS, Email, QR Code, NFC, etc.
Parameters: - my_label – label for this connection
- my_endpoint – endpoint where other party can reach me
- auto_accept – auto-accept a corresponding connection request (None to use config)
- public – set to create an invitation from the public DID
- hs_protos – list of handshake protocols to include
- multi_use – set to True to create an invitation for multiple-use connection
- alias – optional alias to apply to connection for later use
- attachments – list of dicts in form of {“id”: …, “type”: …}
Returns: Invitation record
-
find_existing_connection
(tag_filter: dict, post_filter: dict) → Optional[aries_cloudagent.connections.models.conn_record.ConnRecord][source]¶ Find existing ConnRecord.
Parameters: - tag_filter – The filter dictionary to apply
- post_filter – Additional value filters to apply matching positively, with sequence values specifying alternatives to match (hit any)
Returns: ConnRecord or None
-
receive_invitation
(invi_msg: aries_cloudagent.protocols.out_of_band.v1_0.messages.invitation.InvitationMessage, use_existing_connection: bool = True, auto_accept: bool = None, alias: str = None, mediation_id: str = None) → dict[source]¶ Receive an out of band invitation message.
Parameters: - invi_msg – invitation message
- use_existing_connection – whether to use existing connection if possible
- auto_accept – whether to accept the invitation automatically
- alias – Alias for connection record
- mediation_id – mediation identifier
Returns: ConnRecord, serialized
-
receive_problem_report
(problem_report: aries_cloudagent.protocols.out_of_band.v1_0.messages.problem_report.OOBProblemReport, receipt: aries_cloudagent.transport.inbound.receipt.MessageReceipt, conn_record: aries_cloudagent.connections.models.conn_record.ConnRecord) → None[source]¶ Receive and process a ProblemReport message from the inviter to invitee.
Process a ProblemReport message by updating the ConnRecord metadata state to not_accepted.
Parameters: - problem_report – The OOBProblemReport to process
- receipt – The message receipt
Returns:
Raises: OutOfBandManagerError
– if there is an error in processing the- HandshakeReuseAccept message
-
receive_reuse_accepted_message
(reuse_accepted_msg: aries_cloudagent.protocols.out_of_band.v1_0.messages.reuse_accept.HandshakeReuseAccept, receipt: aries_cloudagent.transport.inbound.receipt.MessageReceipt, conn_record: aries_cloudagent.connections.models.conn_record.ConnRecord) → None[source]¶ Receive and process a HandshakeReuseAccept message under RFC 0434.
Process a HandshakeReuseAccept message by updating the ConnRecord metadata state to accepted.
Parameters: - reuse_accepted_msg – The HandshakeReuseAccept to process
- receipt – The message receipt
Returns:
Raises: OutOfBandManagerError
– if there is an error in processing the- HandshakeReuseAccept message
-
receive_reuse_message
(reuse_msg: aries_cloudagent.protocols.out_of_band.v1_0.messages.reuse.HandshakeReuse, receipt: aries_cloudagent.transport.inbound.receipt.MessageReceipt) → None[source]¶ Receive and process a HandshakeReuse message under RFC 0434.
Process a HandshakeReuse message by looking up the connection records using the MessageReceipt sender DID.
Parameters: - reuse_msg – The HandshakeReuse to process
- receipt – The message receipt
Returns:
Raises: OutOfBandManagerError
– If the existing connection is not active- or the connection does not exists
-
session
¶ Accessor for the current profile session.
Returns: The profile session for this connection manager
-
-
exception
aries_cloudagent.protocols.out_of_band.v1_0.manager.
OutOfBandManagerError
(*args, error_code: str = None, **kwargs)[source]¶ Bases:
aries_cloudagent.core.error.BaseError
Out of band error.
-
exception
aries_cloudagent.protocols.out_of_band.v1_0.manager.
OutOfBandManagerNotImplementedError
(*args, error_code: str = None, **kwargs)[source]¶ Bases:
aries_cloudagent.core.error.BaseError
Out of band error for unimplemented functionality.
aries_cloudagent.protocols.out_of_band.v1_0.message_types module¶
Message and inner object type identifiers for Out of Band messages.
aries_cloudagent.protocols.out_of_band.v1_0.routes module¶
Out-of-band handling admin routes.
-
class
aries_cloudagent.protocols.out_of_band.v1_0.routes.
InvitationCreateQueryStringSchema
(*args, **kwargs)[source]¶ Bases:
aries_cloudagent.messaging.models.openapi.OpenAPISchema
Parameters and validators for create invitation request query string.
-
auto_accept
= <fields.Boolean(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid boolean.'})>¶
-
multi_use
= <fields.Boolean(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid boolean.'})>¶
-
-
class
aries_cloudagent.protocols.out_of_band.v1_0.routes.
InvitationCreateRequestSchema
(*args, **kwargs)[source]¶ Bases:
aries_cloudagent.messaging.models.openapi.OpenAPISchema
Invitation create request Schema.
-
class
AttachmentDefSchema
(*args, **kwargs)[source]¶ Bases:
aries_cloudagent.messaging.models.openapi.OpenAPISchema
Attachment Schema.
-
alias
= <fields.String(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>¶
-
attachments
= <fields.Nested(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'type': 'Invalid type.'})>¶
-
handshake_protocols
= <fields.List(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid list.'})>¶
-
mediation_id
= <fields.String(default=<marshmallow.missing>, attribute=None, validate=<aries_cloudagent.messaging.valid.UUIDFour object>, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>¶
-
metadata
= <fields.Dict(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid mapping type.'})>¶
-
my_label
= <fields.String(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>¶
-
use_public_did
= <fields.Boolean(default=False, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid boolean.'})>¶
-
class
-
class
aries_cloudagent.protocols.out_of_band.v1_0.routes.
InvitationReceiveQueryStringSchema
(*args, **kwargs)[source]¶ Bases:
aries_cloudagent.messaging.models.openapi.OpenAPISchema
Parameters and validators for receive invitation request query string.
-
alias
= <fields.String(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>¶
-
auto_accept
= <fields.Boolean(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid boolean.'})>¶
-
mediation_id
= <fields.String(default=<marshmallow.missing>, attribute=None, validate=<aries_cloudagent.messaging.valid.UUIDFour object>, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>¶
-
use_existing_connection
= <fields.Boolean(default=True, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid boolean.'})>¶
-
-
class
aries_cloudagent.protocols.out_of_band.v1_0.routes.
OutOfBandModuleResponseSchema
(*args, **kwargs)[source]¶ Bases:
aries_cloudagent.messaging.models.openapi.OpenAPISchema
Response schema for Out of Band Module.
-
aries_cloudagent.protocols.out_of_band.v1_0.routes.
invitation_create
(request: <sphinx.ext.autodoc.importer._MockObject object at 0x7fb0542a2750>)[source]¶ Request handler for creating a new connection invitation.
Parameters: request – aiohttp request object Returns: The out of band invitation details
-
aries_cloudagent.protocols.out_of_band.v1_0.routes.
invitation_receive
(request: <sphinx.ext.autodoc.importer._MockObject object at 0x7fb0542a2750>)[source]¶ Request handler for receiving a new connection invitation.
Parameters: request – aiohttp request object Returns: The out of band invitation details