Skip to content

Add websocket commands for refresh tokens#16559

Merged
awarecan merged 2 commits intodevfrom
websocket-refresh-tokens
Sep 11, 2018
Merged

Add websocket commands for refresh tokens#16559
awarecan merged 2 commits intodevfrom
websocket-refresh-tokens

Conversation

@balloob
Copy link
Copy Markdown
Member

@balloob balloob commented Sep 11, 2018

Description:

Allows users to manage refresh tokens via websocket commands. Will be used from the frontend.

CC @awarecan

Related issue (if applicable): #15195

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

"""Handle a delete refresh token request."""
async def async_delete_refresh_token(user, refresh_token_id):
"""Delete a refresh token."""
refresh_token = await hass.auth.async_get_refresh_token(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we do

refresh_token = connection.user.refresh_tokens.get(refresh_token_id)

@balloob
Copy link
Copy Markdown
Member Author

balloob commented Sep 11, 2018

Fixed

@awarecan awarecan merged commit 0db13a9 into dev Sep 11, 2018
@ghost ghost removed the in progress label Sep 11, 2018
@balloob balloob deleted the websocket-refresh-tokens branch September 11, 2018 16:18
@balloob balloob added this to the 0.78.0 milestone Sep 11, 2018
balloob added a commit that referenced this pull request Sep 11, 2018
* Add websocket commands for refresh tokens

* Comment
@balloob balloob mentioned this pull request Sep 17, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Feb 5, 2019
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.

3 participants