Skip to content

authentication providers should check for valid hostnames before adding anything #1009

@baywet

Description

@baywet

The authentication provider should not add any auth information to a request that's not going to hosts we "know".
The AuthenticationProvider interface needs two more methods: Set/GetValidHostNames (hashset).
This then needs to be implemented in the base bearer authentication provider, which needs to check the hostname is present in that list before it adds the authorization header.
The request adapter interface needs to expose a getter to the authentication provider.
Finally, the constructor for the api client needs to set the value based on information available (hosts) in the OpenAPI description.

Metadata

Metadata

Assignees

Labels

CsharpPull requests that update .net codeGoJavaPHPRubyTypeScriptPull requests that update Javascript codefixed

Type

No type

Projects

Status

Done ✔️

Relationships

None yet

Development

No branches or pull requests

Issue actions