-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mindful auth #744
Mindful auth #744
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,12 +117,13 @@ def run( | |
credentials_mindful = None | ||
raise CredentialError("Credentials not found.") | ||
|
||
header = { | ||
"Authorization": f"Bearer {credentials_mindful.get('VAULT')}", | ||
} | ||
auth = ( | ||
credentials_mindful["CUSTOMER_UUID"], | ||
credentials_mindful["AUTH_TOKEN"], | ||
Comment on lines
+121
to
+122
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here you are getting There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In mindful, the user is defined by an ID, in this case, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. when I saved it to the credentials, I added the same words they decided to use for the user (mindful velux user) and the password (mindful velux password). |
||
) | ||
|
||
mindful = Mindful( | ||
header=header, | ||
auth=auth, | ||
region=region, | ||
start_date=start_date, | ||
end_date=end_date, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docstring says that
The structure is user and password
. In the task, you are gettingCUSTOMER_UUID
andAUTH_TOKEN
. It doesn't look like a username and password.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the auth accepts the function
HTTPBasicAuth
which only needs the user and password.I you think it necessary for name consistency, I could replace
user
andpassword
in docstring bycustomer_uuid
andauth_token
respectively.