Add SENZ application credentials platform (#72338)

This commit is contained in:
Allen Porter 2022-05-23 05:44:45 -07:00 committed by GitHub
parent 9763b44357
commit dc76cce96b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 42 additions and 18 deletions

View file

@ -0,0 +1,14 @@
"""Application credentials platform for senz."""
from aiosenz import AUTHORIZATION_ENDPOINT, TOKEN_ENDPOINT
from homeassistant.components.application_credentials import AuthorizationServer
from homeassistant.core import HomeAssistant
async def async_get_authorization_server(hass: HomeAssistant) -> AuthorizationServer:
"""Return authorization server."""
return AuthorizationServer(
authorize_url=AUTHORIZATION_ENDPOINT,
token_url=TOKEN_ENDPOINT,
)