ch4mpy / spring-addons

Ease spring OAuth2 resource-servers configuration and testing
Apache License 2.0
552 stars 89 forks source link

Auto-configure (with application properties) additional parameters for authorization-code request #129

Closed ch4mpy closed 1 year ago

ch4mpy commented 1 year ago

Is your feature request related to a problem? Please describe. Auth0 enforces the usage of audience, but Spring Boot client configuration offers nothing to that regard and I have to customize the authorization request in Java code.

Describe the solution you'd like Configure audience in application properties and have Spring Boot starters auto-configure the authorization request for me.

ch4mpy commented 1 year ago

Let's make this feature more generic and allow to add any parameters to the authorization-code request (not just Audience).

Here is sample for the target configuration (where auth0-confidential-user references an existing entry in spring.security.oauth2.client.registration):

com:
  c4-soft:
    springaddons:
      security:
        client:
          authorization-request-params:
            auth0-confidential-user:
            - name: audience
              value: https://bff.demo.c4-soft.com
            - name: machin
              value: truc
            - name: machin
              value: chose