aiowamp.AuthKeyring

class aiowamp.AuthKeyring(*methods, auth_id=None)[source]

Initialise the keyring.

Parameters:
  • *methods – Methods to initialise the keyring with.
  • auth_id (Optional[str]) – Auth id to use. Defaults to None.
  • methods (ForwardRef) –
Raises:

ValueError – - The same auth method type was specified multiple times. - No auth id was specified but one of the methods requires it. - Multiple methods specify the same auth extra key with

differing values.

__init__(*methods, auth_id=None)[source]

Initialise the keyring.

Parameters:
  • *methods – Methods to initialise the keyring with.
  • auth_id (Optional[str]) – Auth id to use. Defaults to None.
  • methods (ForwardRef) –
Raises:

ValueError – - The same auth method type was specified multiple times. - No auth id was specified but one of the methods requires it. - Multiple methods specify the same auth extra key with

differing values.

Return type:

None

Methods

__init__(*methods[, auth_id]) Initialise the keyring.
get(k[,d])
items()
keys()
values()

Attributes

auth_extra Auth extras with all the auth extras from the underlying methods.
auth_id Auth id to use during authentication.
__init__(*methods, auth_id=None)[source]

Initialise the keyring.

Parameters:
  • *methods – Methods to initialise the keyring with.
  • auth_id (Optional[str]) – Auth id to use. Defaults to None.
  • methods (ForwardRef) –
Raises:

ValueError – - The same auth method type was specified multiple times. - No auth id was specified but one of the methods requires it. - Multiple methods specify the same auth extra key with

differing values.

Return type:

None

__repr__()[source]

Return repr(self).

Return type:str
__getitem__(method)[source]

Get the auth method with the given name.

Parameters:method (str) – Name of the method to get.
Return type:AuthMethodABC
Returns:Auth method stored in the keyring.
Raises:KeyError – If no auth method with the given method exists in the keyring.
__len__()[source]

Get the amount of auth methods in the keyring.

Return type:int
__iter__()[source]

Get an iterator for the auth method names in the keyring.

Return type:Iterator[str]
auth_id

Auth id to use during authentication.

Because most authentication methods require an auth id, this is handled by the keyring.

Return type:Optional[str]
auth_extra

Auth extras with all the auth extras from the underlying methods.

None if no auth extras are required.

Return type:Optional[Dict[str, ForwardRef]]