Lines 357-362
class AzureAuth(object):
|
Link Here
|
---|
|
357 |
ids = self.load_azure_ids(adconnection_alias) |
357 |
ids = self.load_azure_ids(adconnection_alias) |
358 |
try: |
358 |
try: |
359 |
self.client_id = ids["client_id"] |
359 |
self.client_id = ids["client_id"] |
|
|
360 |
self.client_secret = ids["client_secret"] |
360 |
self.adconnection_id = ids["adconnection_id"] |
361 |
self.adconnection_id = ids["adconnection_id"] |
361 |
self.reply_url = ids["reply_url"] |
362 |
self.reply_url = ids["reply_url"] |
362 |
self.domain = ids["domain"] |
363 |
self.domain = ids["domain"] |
Lines 611-626
class AzureAuth(object):
|
Link Here
|
---|
|
611 |
return adconnection_id |
612 |
return adconnection_id |
612 |
|
613 |
|
613 |
def retrieve_access_token(self): |
614 |
def retrieve_access_token(self): |
614 |
assertion = self._get_client_assertion() |
|
|
615 |
|
616 |
post_form = { |
615 |
post_form = { |
617 |
'resource': resource_url, |
616 |
'resource': resource_url, |
618 |
'client_id': self.client_id, |
617 |
'client_id': self.client_id, |
619 |
'client_assertion_type': 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer', |
|
|
620 |
'client_assertion': assertion, |
621 |
'grant_type': 'client_credentials', |
618 |
'grant_type': 'client_credentials', |
622 |
'redirect_uri': self.reply_url, |
619 |
'client_secret': self.client_secret |
623 |
'scope': SCOPE |
|
|
624 |
} |
620 |
} |
625 |
url = oauth2_token_url.format(adconnection_id=self.adconnection_id) |
621 |
url = oauth2_token_url.format(adconnection_id=self.adconnection_id) |
626 |
|
622 |
|