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

JsonRpcProvider: Basic access authentication support #97

Merged
merged 2 commits into from
Mar 10, 2024

Conversation

msmania
Copy link
Contributor

@msmania msmania commented Feb 10, 2024

With this patch, JsonRpcProvider accepts a url with basic authentication credentials like this:

const PoktEndpoint = 'https://scott:[email protected]';
const provider = new JsonRpcProvider({
  rpcUrl: PoktEndpoint,
  dispatchers: [PoktEndpoint],
});

@msmania msmania self-assigned this Feb 12, 2024
@msmania msmania added the enhancement New feature or request label Feb 12, 2024
@msmania msmania requested a review from kutoft February 12, 2024 22:28
Copy link
Contributor

@kutoft kutoft left a comment

Choose a reason for hiding this comment

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

Everything looks good, just one comment.

packages/provider/src/json-rpc-provider.ts Show resolved Hide resolved
@kutoft
Copy link
Contributor

kutoft commented Feb 16, 2024

With this patch, JsonRpcProvider accepts a url with basic authentication credentials like this:

const PoktEndpoint = 'https://scott:[email protected]';
const provider = new JsonRpcProvider({
  rpcUrl: PoktEndpoint,
  dispatchers: [PoktEndpoint],
});

This could also be helpful in the READ.ME

@msmania msmania force-pushed the toshi/provider-basic-auth branch from 6cee631 to ca11c1c Compare February 16, 2024 22:11
With this patch, `JsonRpcProvider` accepts a url with basic authentication
credentials like this:

```
const PoktEndpoint = 'https://scott:[email protected]';
const provider = new JsonRpcProvider({
  rpcUrl: PoktEndpoint,
  dispatchers: [PoktEndpoint],
});
```
@msmania msmania force-pushed the toshi/provider-basic-auth branch from ca11c1c to db5a3bb Compare February 16, 2024 22:28
@msmania msmania requested a review from kutoft February 16, 2024 22:34
@msmania msmania requested review from Olshansk and nodiesBlade and removed request for kutoft March 6, 2024 21:12
nodiesBlade
nodiesBlade previously approved these changes Mar 10, 2024
@msmania msmania merged commit 1766e70 into pokt-network:main Mar 10, 2024
2 of 3 checks passed
@msmania msmania deleted the toshi/provider-basic-auth branch March 10, 2024 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants