Skip to content

Commit

Permalink
encryption certificate added
Browse files Browse the repository at this point in the history
  • Loading branch information
optimygmbh committed Oct 10, 2024
1 parent 6103ed8 commit cafac72
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion office365/subscriptions/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ def add(
expiration,
client_state=None,
latest_supported_tls_version=None,
include_resource_data=False,
include_resource_data=None,
encryption_certificate=None,
encryption_certificate_id=None,
):
"""
Subscribes a listener application to receive change notifications when the requested type of changes occur
Expand All @@ -35,6 +37,16 @@ def add(
:param str latest_supported_tls_version: Specifies the latest version of Transport Layer Security (TLS) that
the notification endpoint, specified by notificationUrl, supports.
The possible values are: v1_0, v1_1, v1_2, v1_3.
:param bool include_resource_data: Indicates whether the resource data for the resource that generated the
change notification should be included in the payload of the notification.
:param str encryption_certificate: Specifies the public key certificate which contains only the public key
that Microsoft Graph uses to encrypt the resource data it returns to your app. For security, Microsoft
Graph encrypts the resource data returned in a rich notification. You must provide a public encryption
key as part of creating the subscription.
:param str encryption_certificate_id: Specifies the identifier of the certificate used to encrypt the content
of the change notification. Use this ID to match in each change notification, which certificate to use
for decryption.
:return: Subscription
"""
return_type = Subscription(self.context)
self.add_child(return_type)
Expand All @@ -46,6 +58,8 @@ def add(
"clientState": client_state,
"latestSupportedTlsVersion": latest_supported_tls_version,
"includeResourceData": include_resource_data,
"encryptionCertificate": encryption_certificate,
"encryptionCertificateId": encryption_certificate_id,
}
qry = CreateEntityQuery(self, payload, return_type)
self.context.add_query(qry)
Expand Down

0 comments on commit cafac72

Please sign in to comment.