Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixing typo in parameter name
  • Loading branch information
abhidnya13 committed Oct 18, 2019
commit 017d9d371cbd06ca94013ac9018848a33a240cc3
4 changes: 2 additions & 2 deletions msal/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def __init__(
client_credential=None, authority=None, validate_authority=True,
token_cache=None,
verify=True, proxies=None, timeout=None,
client_claims=None, trust_famework_policy=None):
client_claims=None, trust_framework_policy=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the currently proposal is:

.WithAuthority(string authority, string trustFrameworkPolicy)

not

.WithAuthority(string authority) .WithTrustFrameworkPolicy(string trustFrameworkPolicy)

So the precise mapping would be just change the "shape" of the existing authority parameter, rather than introducing a new parameter for PCA.

Perhaps we want to have something like this (with the comparing to C# version, side-by-side)?

authority = {"authority": "https://domain/tenant", "policy": "B2C_1_SignIn"}
# .WithAuthority(string authority, string trustFrameworkPolicy)

And then the pca can be created like this:

pca = PublicClientApplication(
    ...,
    authority={"authority": "https://domain/tenant", "policy": "B2C_1_SignIn"},
    ...)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note to use userFlow instead of policy or trustFrameworkPolicy. thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then let's use snake_case user_flow.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

"""Create an instance of application.

:param client_id: Your app has a client_id after you register it on AAD.
Expand Down Expand Up @@ -140,7 +140,7 @@ def __init__(
self.timeout = timeout
self.authority = Authority(
authority or "https://login.microsoftonline.com/common/",
validate_authority, verify=verify, proxies=proxies, timeout=timeout, trust_framework_policy=trust_famework_policy)
validate_authority, verify=verify, proxies=proxies, timeout=timeout, trust_framework_policy=trust_framework_policy)
# Here the self.authority is not the same type as authority in input
self.token_cache = token_cache or TokenCache()
self.client = self._build_client(client_credential, self.authority)
Expand Down
Binary file not shown.