Authentication Information
API reference for diameter.message.commands.authentication_information.
This module contains Authentication Information Request and Answer messages for the S6a/S6d interface, implementing AVPs documented in 3GPP TS 29.272.
AuthenticationInformation ¶
AuthenticationInformation(
header: MessageHeader = None, avps: list[Avp] = None
)
Bases: DefinedMessage
An Authentication-Information base message.
This message class lists message attributes based on the current 3GPP TS 29.272 version 19.4.0 Release 19 as python properties, accessible as instance attributes. AVPs not listed in the spec protocol can be retrieved using the AuthenticationInformation.find_avps search method.
Examples:
AVPs accessible either as instance attributes or by searching:
>>> msg = Message.from_bytes(b"...")
>>> msg.session_id
dra1.python-diameter.org;2323;546
>>> msg.find_avps((AVP_SESSION_ID, 0))
['dra1.python-diameter.org;2323;546']
When diameter message is decoded using
Message.from_bytes, it returns
either an instance of AuthenticationInformationRequest or
AuthenticationInformationAnswer automatically:
>>> msg = Message.from_bytes(b"...")
>>> assert msg.header.is_request is True
>>> assert isinstance(msg, AuthenticationInformationRequest)
When creating a new message, the AuthenticationInformationRequest or
AuthenticationInformationAnswer class should be instantiated directly,
and values for AVPs set as class attributes:
>>> msg = AuthenticationInformationRequest()
>>> msg.session_id = "dra1.python-diameter.org;2323;546"
Other, custom AVPs can be appended to the message using the
AuthenticationInformation.append_avp
method, or by overwriting the avp attribute entirely. Regardless of the
custom AVPs set, the mandatory values listed in TS 29.272 must be set,
however they can be set as None, if they are not to be used.
Warning
Every AVP documented for the subclasses of this command can be accessed
as an instance attribute, even if the original network-received message
did not contain that specific AVP. Such AVPs will be returned with the
value None when accessed.
Every other AVP not mentioned here, and not present in a
network-received message will raise an AttributeError when being
accessed; their presence should be validated with hasattr before
accessing.
AuthenticationInformationAnswer ¶
AuthenticationInformationAnswer(
header: MessageHeader = None, avps: list[Avp] = None
)
Bases: AuthenticationInformation
An Authentication-Information-Answer message.
3GPP TS 29.272 version 19.4.0
vendor_specific_application_id
instance-attribute
¶
vendor_specific_application_id: VendorSpecificApplicationId
AuthenticationInformationRequest ¶
AuthenticationInformationRequest(
header: MessageHeader = None, avps: list[Avp] = None
)
Bases: AuthenticationInformation
A Authentication-Information-Request message.
3GPP TS 29.272 version 19.4.0
requested_eutran_authentication_info
instance-attribute
¶
requested_eutran_authentication_info: (
RequestedEutranAuthenticationInfo
)
requested_utran_geran_authentication_info
instance-attribute
¶
requested_utran_geran_authentication_info: (
RequestedUtranGeranAuthenticationInfo
)
vendor_specific_application_id
instance-attribute
¶
vendor_specific_application_id: VendorSpecificApplicationId