Skip to content

Use IndieAuth for client ID#15369

Merged
balloob merged 5 commits intodevfrom
indieauth
Jul 9, 2018
Merged

Use IndieAuth for client ID#15369
balloob merged 5 commits intodevfrom
indieauth

Conversation

@balloob
Copy link
Copy Markdown
Member

@balloob balloob commented Jul 8, 2018

Description:

Implements the IndieAuth approach to clients.

Related issue (if applicable): home-assistant/architecture#44

Example entry for configuration.yaml (if applicable):

See https://developers.home-assistant.io/blog/2018/07/02/trying-new-auth.html

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.

Comment thread tests/components/auth/test_init.py Outdated
}, auth=CLIENT_AUTH)
assert resp.status == 200
})
assert resp.status == 200, step
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

undefined name 'step'

if parts.password is not None:
raise ValueError('Client ID cannot contain password')

# MAY contain a port
Copy link
Copy Markdown
Contributor

@awarecan awarecan Jul 8, 2018

Choose a reason for hiding this comment

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

EDIT: I was wrong. There is no issue.

It has two paragraph in spec very close, 3.1 User Profile URL and 3.2 Client Identifier, the only different between these two are User Profile URL do not allow port and ip address, Client Identifier allow port and 127.0.0.1

I confused those two.

Copy link
Copy Markdown
Contributor

@awarecan awarecan Jul 8, 2018

Choose a reason for hiding this comment

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

No issue.

@@ -0,0 +1,98 @@
"""Helpers to resolve client ID/secret."""
from ipaddress import ip_address
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

'ipaddress.ip_address' imported but unused

@awarecan
Copy link
Copy Markdown
Contributor

awarecan commented Jul 9, 2018

LGTM

@balloob balloob merged commit 0d4841c into dev Jul 9, 2018
@ghost ghost removed the in progress label Jul 9, 2018
@balloob balloob deleted the indieauth branch July 9, 2018 16:25
awarecan pushed a commit to awarecan/home-assistant that referenced this pull request Jul 16, 2018
* Use IndieAuth for client ID

* Lint

* Lint & Fix tests

* Allow local IP addresses

* Update comment
@balloob balloob mentioned this pull request Jul 20, 2018
michaeldavie pushed a commit to michaeldavie/home-assistant that referenced this pull request Jul 31, 2018
* Use IndieAuth for client ID

* Lint

* Lint & Fix tests

* Allow local IP addresses

* Update comment
girlpunk pushed a commit to girlpunk/home-assistant that referenced this pull request Sep 4, 2018
* Use IndieAuth for client ID

* Lint

* Lint & Fix tests

* Allow local IP addresses

* Update comment
@home-assistant home-assistant locked and limited conversation to collaborators Dec 10, 2018
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.

4 participants