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

Adding ECDSA JWT Functions #4

Conversation

christopherhein
Copy link
Contributor

Why:

  • This allows anyone to use any of the three ecdsa encryption functions

secret_key.generate_key
public_key = OpenSSL::PKey::EC.new secret_key
public_key.private_key = nil

Copy link
Collaborator

Choose a reason for hiding this comment

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

Trailing whitespace detected.

end
end
end
Copy link
Collaborator

Choose a reason for hiding this comment

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

Final newline missing.

Doorkeeper::JWT.configuration.secret_key
end
def secret_key
return secret_key_file if !secret_key_file.nil?
Copy link
Collaborator

Choose a reason for hiding this comment

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

Favor unless over if for negative conditions.

Why:

* This allows anyone to use any of the three ecdsa encryption functions
@christopherhein
Copy link
Contributor Author

@chriswarren, not sure if this is something that you'd want in doorkeeper-jwt I'm currently using ecdsa for my JWT auth, it's proven to be a bit faster for embedded devices to run ecdsa. Feel free to shoot any comments back I'd love to get this implemented in the core.

@christopherhein
Copy link
Contributor Author

@chriswarren any chance you can take a look at this?

@chriswarren
Copy link
Collaborator

Sorry for the delay on getting to this - it looks great. Thanks for adding it. I'll merge it in and get it pushed up to RubyGems tonight.

chriswarren added a commit that referenced this pull request Feb 17, 2016
@chriswarren chriswarren merged commit 5463d89 into doorkeeper-gem:master Feb 17, 2016
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.

None yet

3 participants