Features¶
- class osmxmpp.features.abc.XmppFeature¶
Bases:
ABCFeatures are used to implement specific XMPP stream features.
- ID¶
The ID of the feature implementation.
- Type:
str
- TAG¶
The tag of the feature. This is used to identify the feature in the XML stream.
- Type:
str
- RECEIVE_NEW_FEATURES¶
Whether the feature should receive new features.
- Type:
bool
- ID = None¶
- RECEIVE_NEW_FEATURES = None¶
- TAG = None¶
Base features¶
TLS¶
- class osmxmpp.features.tls.TlsFeature(ssl_context=None, verify_locations=None)¶
Bases:
XmppFeatureTLS feature implementation.
- ssl_context¶
The SSL context to use.
- Type:
ssl.SSLContext
- verify_locations¶
The locations to verify the server certificate.
- Type:
List[str]
- ID = 'osmiumnet.tls'¶
- RECEIVE_NEW_FEATURES = True¶
-
REQUIRED_PERMISSIONS:
List[XmppPermission] = [<XmppPermission.SEND_XML>, <XmppPermission.RECV_XML>, <XmppPermission.OPEN_STREAM>, <XmppPermission.GET_HOST>, <XmppPermission.GET_SOCKET>, <XmppPermission.CHANGE_SOCKET>]¶
- TAG = 'starttls'¶
SASL¶
- class osmxmpp.features.sasl.SaslException¶
Bases:
Exception
- class osmxmpp.features.sasl.SaslFeature(mechanisms)¶
Bases:
XmppFeatureSASL feature implementation.
- mechanisms¶
The SASL mechanisms to use.
- Type:
List[SaslMechanism]
- Raises:
SaslException – If authentication fails.
- ID = 'osmiumnet.sasl'¶
- RECEIVE_NEW_FEATURES = True¶
-
REQUIRED_PERMISSIONS:
List[XmppPermission] = [<XmppPermission.SEND_XML>, <XmppPermission.RECV_XML>, <XmppPermission.OPEN_STREAM>]¶
- TAG = 'mechanisms'¶
SASL Mechanisms:¶
- class osmxmpp.features.sasl.SaslMechanism¶
Bases:
ABCSASL mechanisms are used to authenticate the user.
- NAME¶
The name of the mechanism.
- Type:
str
- NAME = None¶
- abstractmethod process(ci)¶
Processes the mechanism.
- Parameters:
ci (XmppClientInterface) – The client interface given from the SaslFeature.
- class osmxmpp.features.sasl.PlainMechanism(username, password)¶
Bases:
SaslMechanismPLAIN SASL mechanism implementation.
- username¶
The username to authenticate with.
- Type:
str
- password¶
The password to authenticate with.
- Type:
str
- NAME = 'PLAIN'¶
- process(ci)¶
Processes the mechanism.
- Parameters:
ci (XmppClientInterface) – The client interface given from the SaslFeature.
Bind¶
- class osmxmpp.features.bind.BindFeature(resource)¶
Bases:
XmppFeatureBind feature implementation.
- resource¶
The resource to bind to.
- Type:
str
- ID = 'osmiumnet.bind'¶
- RECEIVE_NEW_FEATURES = False¶
-
REQUIRED_PERMISSIONS:
List[XmppPermission] = [<XmppPermission.SEND_XML>, <XmppPermission.RECV_XML>, <XmppPermission.SET_JID>, <XmppPermission.SET_RESOURCE>]¶
- TAG = 'bind'¶