Skip to content

Instantly share code, notes, and snippets.

View ffenix113's full-sized avatar
🇺🇦

Yevhen Sylenko ffenix113

🇺🇦
View GitHub Profile
@ffenix113
ffenix113 / README.md
Created February 1, 2023 16:59
Home Assistant Keycloak authentication using Direct access grant

Simple auth CLI script to authenticate with Keycloak with username and password.


How to use this:

  1. In direct_auth.py modify configuration, and optionally get_meta_attributes and login_hook functions to your needs.
  2. Place direct_auth.py script into Home assistant. I.e. pass it to Docker container through Volume. Remember where it is located
  3. Merge authenticator configuration from configuration.yml to Home assistant config file and change command to path to direct_auth.py