Skip to content
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

feat: Allow http options to be passed into ParseClient #513

Merged
merged 8 commits into from
May 13, 2023

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented May 13, 2023

New Pull Request Checklist

Issue Description

There are a lot of options and features available to the http clients but we are unable to use them. This PR will allow the developer to control the http transport layer. The main goal was to get certificate pinning working on a self signed tls enabled server.

ParseClient::setHttpOptions($options)

Curl Options: https://www.php.net/manual/en/function.curl-setopt.php
Stream Options: https://www.php.net/manual/en/context.php

Closes: #218

Approach

  • Create a TLS enabled server
  • Test connecting to TLS server
  • Test overriding existing initial setup for http clients
  • Generate self signed certificates
  • Add debugging tools
  • Add tests
  • Add changes to documentation (guides, repository pages, in-code descriptions)

@parse-github-assistant
Copy link

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@codecov
Copy link

codecov bot commented May 13, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (77b06f4) 98.60% compared to head (8905ca8) 98.61%.

❗ Current head 8905ca8 differs from pull request most recent head 86be59a. Consider uploading reports for the commit 86be59a to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #513   +/-   ##
=========================================
  Coverage     98.60%   98.61%           
- Complexity     1062     1068    +6     
=========================================
  Files            38       38           
  Lines          3229     3241   +12     
=========================================
+ Hits           3184     3196   +12     
  Misses           45       45           
Impacted Files Coverage Δ
src/Parse/HttpClients/ParseCurlHttpClient.php 95.60% <100.00%> (+0.09%) ⬆️
src/Parse/HttpClients/ParseStreamHttpClient.php 96.38% <100.00%> (+0.28%) ⬆️
src/Parse/ParseClient.php 95.31% <100.00%> (+0.08%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dplewis dplewis requested a review from mtrezza May 13, 2023 01:41
@mtrezza
Copy link
Member

mtrezza commented May 13, 2023

Rerunning the CI because PHP 8.1 failed

Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

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

Looks good!

@mtrezza mtrezza merged commit ee2a5fa into parse-community:master May 13, 2023
3 checks passed
parseplatformorg pushed a commit that referenced this pull request May 13, 2023
# [2.2.0](2.1.0...2.2.0) (2023-05-13)

### Features

* Allow http options to be passed into `ParseClient` ([#513](#513)) ([ee2a5fa](ee2a5fa))
@parseplatformorg
Copy link

🎉 This change has been released in version 2.2.0

@parseplatformorg parseplatformorg added the state:released Released as stable version Edit label May 13, 2023
@dplewis dplewis deleted the ssl-testing branch May 13, 2023 15:19
@dplewis dplewis mentioned this pull request May 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version Edit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Certificate Pinning
3 participants