Skip to content
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

Add OAuth 2.0 Bearer Token authentication to send_file for telegram_bot #46567

Merged
merged 3 commits into from
Jun 28, 2021
Merged

Conversation

fnoorian
Copy link
Contributor

@fnoorian fnoorian commented Feb 15, 2021

Breaking change

Proposed change

Add bearer token authentication to telegram bot

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml
- alias: 'Telegram bot sends a file that requires OAuth 2.0'
  trigger:
    platform: event
    event_type: telegram_text
  action:
    - service: telegram_bot.send_document
      data:
      data:
        url: http://FILESERVER/file.dat
        authentication: bearer_token  # this is new
        password: !secret FILESERVER_OAUTH_TOKEN  # this is adapted to be used as the token
        target: "{{ trigger.event.data.user_id }}"

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@homeassistant
Copy link
Contributor

Hi @fnoorian,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@github-actions
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@github-actions github-actions bot added the stale label Mar 17, 2021
@fnoorian
Copy link
Contributor Author

Bump to remove stale label

@github-actions github-actions bot removed the stale label Mar 17, 2021
@github-actions
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@github-actions
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@github-actions
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@github-actions github-actions bot added the stale label Jun 22, 2021
Copy link
Member

@cgarwood cgarwood left a comment

Choose a reason for hiding this comment

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

Looks good. Will need rebased and merge conflicts resolved before we can merge.

@frenck
Copy link
Member

frenck commented Jun 28, 2021

  • Rebased the PR onto the latest dev.
  • Adjusted to upstream changes in rebase
  • Adjusted service schema to match current standards
  • Prettier made the service schema prettier, hence some more changes to see (cosmetics only)

@frenck
Copy link
Member

frenck commented Jun 28, 2021

Thanks, @fnoorian 👍

@frenck frenck merged commit fbf85fd into home-assistant:dev Jun 28, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jun 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants