Skip to content

Implement Api Key authorisation on requests #3912

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 16, 2019
Merged

Conversation

codebrain
Copy link
Contributor

It is possible to set both the Basic auth and ApiKey auth together.

Clearly this doesn't make sense to do, and to me this feels like an exception.

Should we throw an exception in the client? (which would only surface at runtime), or do we apply some kind of precedence in which auth to apply if both are set?

I also left in the string override as I think this might be a little easier for someone to use, if they are unable to find our .CreateSecureString() extension method.

@codebrain codebrain mentioned this pull request Jul 3, 2019
17 tasks
Copy link
Member

@Mpdreamz Mpdreamz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome 👍 thanks for picking this up.

I think we should document an API key always takes precedence over BasicAuthentication.

- Ensure API Key auth details are disposed
- Add implementation for HttpConnection
- Use API Key in Pings (if available)
Copy link
Contributor

@russcam russcam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codebrain codebrain changed the base branch from 7.1 to master July 16, 2019 06:29
@codebrain codebrain merged commit b56c7f1 into master Jul 16, 2019
codebrain added a commit that referenced this pull request Jul 16, 2019
Implement Api Key authorisation on requests.

In instances where Basic and ApiKey are set, precedence is given to Api Key.
russcam pushed a commit that referenced this pull request Jul 18, 2019
Implement Api Key authorisation on requests.

In instances where Basic and ApiKey are set, precedence is given to Api Key.
codebrain added a commit that referenced this pull request Jul 19, 2019
Implement Api Key authorisation on requests.

In instances where Basic and ApiKey are set, precedence is given to Api Key.
@russcam russcam deleted the feature/7.1/api-key-auth branch July 24, 2019 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants