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

private method `read_jwk' called for #<Options:0x00000001313a3e28> (NoMethodError) #2

Open
hugoib opened this issue Aug 26, 2024 · 1 comment

Comments

@hugoib
Copy link

hugoib commented Aug 26, 2024

I ran into errors while running the ./generate-dpop-proof script on Mac:

image

I modified the script here:

@key = self.read_jwk(file)

to:
@key = send(:read_jwk, file) # Use send to call the private method

Reasoning:

Using send: The send method allows calling both public and private methods dynamically. By using send(:read_jwk, file), we explicitly call the private method read_jwk within the on method block.
Private Methods: The read_jwk method remains private, maintaining encapsulation, but it is called in a controlled manner.
Additional Notes

This solved the issue.

@TakahikoKawasaki
Copy link
Member

@hugoib Thank you for finding the issue. It seems that the right approach to fix the issue is removing self. from self.read_jwk like this commit: 54552d8

Could you try the updated script?

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

No branches or pull requests

5 participants
@TakahikoKawasaki @hugoib and others