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.controller module¶
Protocol controller for out-of-band.
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
(profile: aries_cloudagent.core.profile.Profile)[source]¶ Bases:
aries_cloudagent.connections.base_manager.BaseConnectionManager
Class for managing out of band messages.
-
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] = None, metadata: dict = None, mediation_id: str = None, service_accept: Optional[Sequence[str]] = None, protocol_version: Optional[str] = None, goal_code: Optional[str] = None, goal: Optional[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”: …}
- service_accept – Optional list of mime types in the order of preference of
- sender that the receiver can use in responding to the message (the) –
- protocol_version – OOB protocol version [1.0, 1.1]
- goal_code – Optional self-attested code for receiver logic
- goal – Optional self-attested string for receiver logic
Returns: Invitation record
-
delete_stale_connection_by_invitation
(invi_msg_id: str)[source]¶ Delete unused connections, using existing an active connection instead.
-
profile
¶ Accessor for the current profile.
Returns: The profile for this connection manager
-
receive_invitation
(invitation: aries_cloudagent.protocols.out_of_band.v1_0.messages.invitation.InvitationMessage, use_existing_connection: bool = True, auto_accept: Optional[bool] = None, alias: Optional[str] = None, mediation_id: Optional[str] = None) → aries_cloudagent.protocols.out_of_band.v1_0.models.oob_record.OobRecord[source]¶ Receive an out of band invitation message.
Parameters: - invitation – 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 OobRecord state to not_accepted.
Parameters: - problem_report – The OOBProblemReport to process
- receipt – The message receipt
Returns: None
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 OobRecord state to accepted.
Parameters: - reuse_accepted_msg – The HandshakeReuseAccept to process
- receipt – The message receipt
Returns: None
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, conn_rec: aries_cloudagent.connections.models.conn_record.ConnRecord) → 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: None
Raises: OutOfBandManagerError
– If the existing connection is not active- or the connection does not exists
-
-
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
¶ Used by autodoc_mock_imports.
-
multi_use
¶ Used by autodoc_mock_imports.
-
-
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.
-
accept
¶ Used by autodoc_mock_imports.
-
alias
¶ Used by autodoc_mock_imports.
-
attachments
¶ Used by autodoc_mock_imports.
-
goal
¶ Used by autodoc_mock_imports.
-
goal_code
¶ Used by autodoc_mock_imports.
-
handshake_protocols
¶ Used by autodoc_mock_imports.
-
mediation_id
¶ Used by autodoc_mock_imports.
-
metadata
¶ Used by autodoc_mock_imports.
-
my_label
¶ Used by autodoc_mock_imports.
-
protocol_version
¶ Used by autodoc_mock_imports.
-
use_public_did
¶ Used by autodoc_mock_imports.
-
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
¶ Used by autodoc_mock_imports.
-
auto_accept
¶ Used by autodoc_mock_imports.
-
mediation_id
¶ Used by autodoc_mock_imports.
-
use_existing_connection
¶ Used by autodoc_mock_imports.
-
-
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 0x7fc044bc7d00>)[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 0x7fc044bc7d00>)[source]¶ Request handler for receiving a new connection invitation.
Parameters: request – aiohttp request object Returns: The out of band invitation details