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

📚 Update SASL docs and add attr_readers #176

Merged
merged 7 commits into from
Sep 20, 2023
Merged

📚 Update SASL docs and add attr_readers #176

merged 7 commits into from
Sep 20, 2023

Conversation

nevans
Copy link
Collaborator

@nevans nevans commented Sep 20, 2023

Because the documentation for Net::IMAP#authenticate and Net::IMAP::SASL both point at the individual authenticators to document their own parameters, it's important that all of the authenticators have documentation of their own. PLAIN and XOAUTH2 in particular both needed more documentation than they had. This PR fixes that, in addition to a few other documentation-related changes.

Each configuration parameter was given an attr_reader (except for CRAM-MD5 and LOGIN, which are deprecated). In addition to being useful for debugging, the attributes are documented in more detail than the same #initialize parameters. In a few cases, ivars were renamed to normalize the parameter names between different authenticators.

Several internal-use constants were made private, which also removes them from the rdoc.

Several authenticator class definitions were re-ordered to place #initialize above all other method defs (after constants and attr_readers). By moving them out of the private section, rdoc now documents the method parameters for them.

The rdoc output is improved simply by making some constants private and
`#initialize` public,

Except for changing visibility, no code was changed (only rearranged).
This also renames `@user` to `@username`, to match other
authenticators.  However, the spec is unclearly worded.   It arguably
_should_ be renamed to (or aliased as) `authzid`. 🤷
Also renamed ivars to match the names used by other authenticators.

However... `DIGEST-MD5` is still deprecated, so don't use it! 😉
@nevans nevans merged commit e64dbc8 into master Sep 20, 2023
22 checks passed
@nevans nevans deleted the fix-sasl-rdoc branch September 20, 2023 19:36
@nevans nevans added the SASL 🔒 Authentication and authentication mechanisms label Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SASL 🔒 Authentication and authentication mechanisms
Development

Successfully merging this pull request may close these issues.

1 participant