Skip to content

Implement auth factory #321

@iMicknl

Description

@iMicknl

As discussed it would be good to implement some kind of authentication factory per server.

Eventually it would be great to investigate

Manufacturers

  • Atlantic Cozytouch -> JWT / OAuth?

# CozyTouch authentication using jwt
if self.server == SUPPORTED_SERVERS["atlantic_cozytouch"]:
jwt = await self.cozytouch_login()
payload = {"jwt": jwt}

Need to investigate if we can just pass this as a Bearer token to requests as well.

Uses bearer token in header, need to handle token refresh
Would the Somfy official API client id / secret work as well?

Endpoint is different (/enduser-mobile-web/1/enduserAPI/) and requires X-Auth-Token header.
/login endpoint doesn't exist, verify with checking another endpoint (/setup?).

self.headers.update ({
     "X-Auth-Token": self.api_token
})

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions