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

[ci skip] Improve ActiveSupport::MessageVerifier docs #44332

Merged
merged 8 commits into from Feb 4, 2022

Conversation

lewispb
Copy link
Contributor

@lewispb lewispb commented Feb 4, 2022

Summary

My main goal was to make it obvious in the MessageVerifier docs that Rails has a way to manage different verifier instances via Rails.application.message_verifier.

While I was in the area I also took the opportunity to improve readability and clarify the rest of the MessageVerifier docs by:

  • Using meaningful example data (e.g. "signed message" rather than "this is a chair")
  • Using consistent parentheses
  • Adding a basic security recommendation around using specific purposes for verifiers
  • Re-ordering sections, moving basic usage to be first and moving custom serializers further down, as (imo) this is something unlikely to be important to most users.

cc @dhh

@dhh dhh merged commit 91f80a8 into rails:main Feb 4, 2022
@lewispb lewispb deleted the message-verifier-docs branch February 4, 2022 16:09
public-rant pushed a commit to opensource-rant/rails that referenced this pull request Feb 17, 2022
* [ci skip] Refer to Rails.application.message_verifier in MessageVerifier docs

* [ci skip] Clarify authentication example

* [ci skip] Use meaningful example data for message verifier docs

* [ci skip] Link to Rails.application.message_verifier docs

* [ci skip] Clarify order of message signing and verification

* [ci skip] Re-order sections in order of expected use

* [ci skip] Recommend using a purpose to reduce risks

* [ci skip] More consistent parentheses
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants