mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Scaffold security
This commit is contained in:
21
libp2p/security/secure_conn_interface.py
Normal file
21
libp2p/security/secure_conn_interface.py
Normal file
@ -0,0 +1,21 @@
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
"""
|
||||
Represents a secured connection object, which includes a connection and details about the security
|
||||
involved in the secured connection
|
||||
|
||||
Relevant go repo: https://github.com/libp2p/go-conn-security/blob/master/interface.go
|
||||
"""
|
||||
class ISecureConn(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def get_conn(self):
|
||||
"""
|
||||
:return: connection object that has been made secure
|
||||
"""
|
||||
|
||||
def get_security_details(self):
|
||||
"""
|
||||
:return: map containing details about the connections security
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user