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

Add ability to pass an auth token #57

Merged
merged 1 commit into from
Apr 24, 2024
Merged

Add ability to pass an auth token #57

merged 1 commit into from
Apr 24, 2024

Conversation

willscott
Copy link
Member

No description provided.

@willscott willscott requested a review from masih April 23, 2024 20:54
Copy link
Member

@masih masih left a comment

Choose a reason for hiding this comment

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

Thank you for knocking this one out 🙏

@@ -38,9 +38,14 @@ func newHeyFil(o ...Option) (*heyFil, error) {
if err != nil {
return nil, err
}
c := jsonrpc.NewClient(opts.api)
Copy link
Member

Choose a reason for hiding this comment

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

Conditionally instantiate if token is set?

flag.Parse()

hf, err := newHeyFil(
WithHttpIndexerEndpoint(*httpIndexerEndpoint),
WithMaxConcurrentChecks(*maxConcurrentChecks),
WithStorePath(*storePath),
WithFileCoinAPIToken(*token),
Copy link
Member

Choose a reason for hiding this comment

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

WithBearerAuthToken?

Copy link
Member Author

Choose a reason for hiding this comment

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

https://api.node.glif.io/ just calls them api keys :)

Copy link
Member

Choose a reason for hiding this comment

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

I would drop FileCoin from the name. I think we don't much that specifically depends on glif. Unless the snapshot format is glif-specific?

In any case, there are mo blockers here.

@willscott willscott merged commit bbb7f4a into main Apr 24, 2024
7 checks passed
@willscott willscott deleted the feat/auth branch April 24, 2024 05:17
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.

2 participants