crossbar.router.auth¶
Submodules¶
Attributes¶
Classes¶
Base class for pending WAMP authentications. |
|
Pending SCRAM authentication. |
|
Pending WAMP-TLS authentication. |
|
Pending authentication information for WAMP-Ticket authentication. |
|
Pending WAMP-CRA authentication. |
Package Contents¶
- AUTHMETHOD_MAP: Dict[str, Type[pending.PendingAuth]][source]¶
- class PendingAuth(pending_session_id: int, transport_details: autobahn.wamp.types.TransportDetails, realm_container: crossbar.interfaces.IRealmContainer, config: Dict[str, Any])[source]¶
Base class for pending WAMP authentications.
After creating a pending authentication first call
open()and thenverify()(each should be called exactly once, and in this order).- AUTHMETHOD = 'abstract'¶
- _authenticator_session: autobahn.wamp.interfaces.ISession | None = None¶
- _realm_container: crossbar.interfaces.IRealmContainer¶
- _session_details¶
- abstractmethod authenticate(signature: str) autobahn.wamp.types.Accept | autobahn.wamp.types.Deny[source]¶
The client has answered with a WAMP AUTHENTICATE message. Verify the message and accept or deny.
- Parameters:
signature – Signature over the challenge as received from the authenticating session.
- Returns:
Either accept or deny the session.
- abstractmethod hello(realm: str, details: autobahn.wamp.types.HelloDetails) autobahn.wamp.types.Accept | autobahn.wamp.types.Deny | autobahn.wamp.types.Challenge[source]¶
When a HELLO message is received, this gets called to open the pending authentication.
- Parameters:
realm – The realm to client wishes to join (if the client did announce a realm).
details – The details of the client provided for HELLO.
- Returns:
Either return a challenge, or immediately accept or deny session.
- log¶
- class PendingAuthScram(pending_session_id: int, transport_details: autobahn.wamp.types.TransportDetails, realm_container: crossbar.interfaces.IRealmContainer, config: Dict[str, Any])[source]¶
Bases:
crossbar.router.auth.pending.PendingAuthPending SCRAM authentication.
- AUTHMETHOD = 'scram'¶
- _channel_id¶
- authenticate(signature: str) autobahn.wamp.types.Accept | autobahn.wamp.types.Deny[source]¶
Verify the signed message sent by the client.
- Parameters:
signature – the base64-encoded result “ClientProof” from the SCRAM protocol
- hello(realm: str, details: autobahn.wamp.types.HelloDetails) autobahn.wamp.types.Accept | autobahn.wamp.types.Deny | autobahn.wamp.types.Challenge[source]¶
When a HELLO message is received, this gets called to open the pending authentication.
- Parameters:
realm – The realm to client wishes to join (if the client did announce a realm).
details – The details of the client provided for HELLO.
- Returns:
Either return a challenge, or immediately accept or deny session.
- log¶
- class PendingAuthTLS(pending_session_id: int, transport_details: autobahn.wamp.types.TransportDetails, realm_container: crossbar.interfaces.IRealmContainer, config: Dict[str, Any])[source]¶
Bases:
crossbar.router.auth.pending.PendingAuthPending WAMP-TLS authentication.
- AUTHMETHOD = 'tls'¶
- _cert_sha1_to_principal = None¶
- _channel_id¶
- _peer_cert¶
- authenticate(signature)[source]¶
The client has answered with a WAMP AUTHENTICATE message. Verify the message and accept or deny.
- Parameters:
signature – Signature over the challenge as received from the authenticating session.
- Returns:
Either accept or deny the session.
- hello(realm, details)[source]¶
When a HELLO message is received, this gets called to open the pending authentication.
- Parameters:
realm – The realm to client wishes to join (if the client did announce a realm).
details – The details of the client provided for HELLO.
- Returns:
Either return a challenge, or immediately accept or deny session.
- log¶
- class PendingAuthTicket(pending_session_id: int, transport_details: autobahn.wamp.types.TransportDetails, realm_container: crossbar.interfaces.IRealmContainer, config: Dict[str, Any])[source]¶
Bases:
crossbar.router.auth.pending.PendingAuthPending authentication information for WAMP-Ticket authentication.
- AUTHMETHOD = 'ticket'¶
- _signature = None¶
- authenticate(signature: str) autobahn.wamp.types.Accept | autobahn.wamp.types.Deny[source]¶
The client has answered with a WAMP AUTHENTICATE message. Verify the message and accept or deny.
- Parameters:
signature – Signature over the challenge as received from the authenticating session.
- Returns:
Either accept or deny the session.
- hello(realm: str, details: autobahn.wamp.types.HelloDetails) autobahn.wamp.types.Accept | autobahn.wamp.types.Deny | autobahn.wamp.types.Challenge[source]¶
When a HELLO message is received, this gets called to open the pending authentication.
- Parameters:
realm – The realm to client wishes to join (if the client did announce a realm).
details – The details of the client provided for HELLO.
- Returns:
Either return a challenge, or immediately accept or deny session.
- log¶
- class PendingAuthWampCra(pending_session_id: int, transport_details: autobahn.wamp.types.TransportDetails, realm_container: crossbar.interfaces.IRealmContainer, config: Dict[str, Any])[source]¶
Bases:
crossbar.router.auth.pending.PendingAuthPending WAMP-CRA authentication.
- AUTHMETHOD = 'wampcra'¶
- _authid = None¶
- _realm = None¶
- _signature = None¶
- authenticate(signature: str) autobahn.wamp.types.Accept | autobahn.wamp.types.Deny[source]¶
The client has answered with a WAMP AUTHENTICATE message. Verify the message and accept or deny.
- Parameters:
signature – Signature over the challenge as received from the authenticating session.
- Returns:
Either accept or deny the session.
- hello(realm: str, details: autobahn.wamp.types.HelloDetails) autobahn.wamp.types.Accept | autobahn.wamp.types.Deny | autobahn.wamp.types.Challenge[source]¶
When a HELLO message is received, this gets called to open the pending authentication.
- Parameters:
realm – The realm to client wishes to join (if the client did announce a realm).
details – The details of the client provided for HELLO.
- Returns:
Either return a challenge, or immediately accept or deny session.
- log¶