Skip to content

Commit

Permalink
Merge branch 'e2e-uses-pca-cca-rather-than-base-class' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
rayluo committed Feb 14, 2021
2 parents 2510796 + 75a286a commit 34e0b82
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/test_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@ def _get_app_and_auth_code(
scopes=["https://graph.microsoft.com/.default"], # Microsoft Graph
**kwargs):
from msal.oauth2cli.authcode import obtain_auth_code
app = msal.ClientApplication(
client_id, client_secret, authority=authority, http_client=MinimalHttpClient())
if client_secret:
app = msal.ConfidentialClientApplication(
client_id,
client_credential=client_secret,
authority=authority, http_client=MinimalHttpClient())
else:
app = msal.PublicClientApplication(
client_id, authority=authority, http_client=MinimalHttpClient())
redirect_uri = "http://localhost:%d" % port
ac = obtain_auth_code(port, auth_uri=app.get_authorization_request_url(
scopes, redirect_uri=redirect_uri, **kwargs))
Expand Down

0 comments on commit 34e0b82

Please sign in to comment.