mirror of
https://github.com/home-assistant/core.git
synced 2026-09-13 12:10:22 +01:00
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
24 lines
750 B
Python
24 lines
750 B
Python
"""application_credentials platform the Weheat integration."""
|
|
|
|
from homeassistant.components.application_credentials import ClientCredential
|
|
from homeassistant.core import HomeAssistant
|
|
from homeassistant.helpers.config_entry_oauth2_flow import (
|
|
LocalOAuth2ImplementationWithPkce,
|
|
)
|
|
|
|
from .const import OAUTH2_AUTHORIZE, OAUTH2_TOKEN
|
|
|
|
|
|
async def async_get_auth_implementation(
|
|
hass: HomeAssistant, auth_domain: str, credential: ClientCredential
|
|
) -> LocalOAuth2ImplementationWithPkce:
|
|
"""Return auth implementation with PKCE support."""
|
|
return LocalOAuth2ImplementationWithPkce(
|
|
hass,
|
|
auth_domain,
|
|
credential.client_id,
|
|
OAUTH2_AUTHORIZE,
|
|
OAUTH2_TOKEN,
|
|
credential.client_secret,
|
|
)
|