Open MelleD opened 1 year ago
If there are multiple security schemes, the Feign client will simply use all of them instead of the assigned one.
Example
/foo: get: ... security: - foo: [ ] /bar: get: ... security: - bar: [ ] securitySchemes: foo: type: oauth2 flows: authorizationCode: authorizationUrl: 'foo/auth' tokenUrl: 'foo/token' scopes: { } clientCredentials: tokenUrl: '/foo/token' scopes: { } bar: type: http scheme: basic
However, the Feign client always uses ALL secruity methods instead of a special one. I know how to fix the ClientConfiguration.
However, I have problems at this point. How do I find out which secruity (bar or foo) was assigned to the resource?
Code:
@FeignClient(name="${{openbrace}}{{classVarName}}.name:{{classVarName}}{{closebrace}}", {{#useFeignClientUrl}}url="${{openbrace}}{{classVarName}}.url:{{basePath}}{{closebrace}}", {{/useFeignClientUrl}}configuration = ClientConfiguration.class) public interface {{classname}}Client extends {{classname}} { }
Here in the last line I need a if or the information which security method is assignedconfiguration = ClientConfiguration.class
configuration = ClientConfiguration.class
Is there a possibilty to get this information? @wing328 @welshm @borsch any ideas?
@MelleD at "postProcessOperations" write code that would figure out which security schema is applied to that particular operation?
If there are multiple security schemes, the Feign client will simply use all of them instead of the assigned one.
Example
However, the Feign client always uses ALL secruity methods instead of a special one. I know how to fix the ClientConfiguration.
However, I have problems at this point. How do I find out which secruity (bar or foo) was assigned to the resource?
Code:
Here in the last line I need a if or the information which security method is assigned
configuration = ClientConfiguration.class
Is there a possibilty to get this information? @wing328 @welshm @borsch any ideas?