-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
Reolink only-token client added #1614
Conversation
plugins/reolink/src/reolink-api.ts
Outdated
@@ -89,8 +89,12 @@ export class ReolinkCameraClient { | |||
await this.login(); | |||
const url = options.url as URL; | |||
const params = url.searchParams; | |||
for (const [k, v] of Object.entries(this.parameters)) { | |||
params.set(k, v); | |||
if(this.forceToken) { |
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.
this change is not necessary. the purpose of parameters it to return parameters needed for auth. why manually parsing them out?
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.
done, some calls fail if providing both token and user/pass, but if forceToken is set they will never be set
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.
How would both token and username pass be set?
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.
in this case it's not possible, it was something from the previous branch
No description provided.