2

I am trying to configure HWIOAuth bundle to use dynamic client id. I have a service that can figure out what variable value to use depending on some request conditions.

Here's an expression in my HWI configuration, but can't seem to get it work:

hwi_oauth:
    firewall_names:
        - main
    resource_owners:
        auth:
            client_id:           "@=service('host.configmgr').GetClientIdParameter()"
            client_secret:       '%client_secret%'

The issue us with @=service('host.configmgr').GetClientIdParameter(). Can that even execute evaluate? The service is properly executes an used by another class somewhere else with success.

The %client_secret% parameter replacement works fine.

For more context, this part of the configuration lives in a dedicated file that is included in config.yml via { resource: hwiconfig.yml }

1 Answer 1

1

After some research looks like expressions are only supported for service definitions. This functionality is not supported for configurations outside services like the HWI bundle config.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.