Skip to content

Commit

Permalink
Add initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
fblupi committed Oct 6, 2023
1 parent 64bdb01 commit fc3d5f9
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions config/initializers/odoo.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Decidim::Odoo.configure do |config|
# Configure api credentials
config.api = {
base_url: ENV["ODOO_API_BASE_URL"].presence,
api_key: ENV["ODOO_API_API_KEY"].presence
}

# Configure omniauth secrets
config.keycloak_omniauth = {
enabled: ENV["OMNIAUTH_ODOO_KEYCLOAK_CLIENT_ID"].present?,
client_id: ENV["OMNIAUTH_ODOO_KEYCLOAK_CLIENT_ID"].presence,
client_secret: ENV["OMNIAUTH_ODOO_KEYCLOAK_CLIENT_SECRET"].presence,
client_options: {
site: ENV["OMNIAUTH_ODOO_KEYCLOAK_SITE"].presence,
realm: ENV["OMNIAUTH_ODOO_KEYCLOAK_REALM"].presence
},
icon_path: ENV["OMNIAUTH_ODOO_KEYCLOAK_ICON_PATH"].presence || "media/images/odoo_logo.svg"
}
end

0 comments on commit fc3d5f9

Please sign in to comment.