Skip to content

Commit

Permalink
capabilities docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
nevans committed Jul 22, 2023
1 parent b3e65ff commit b7c61c6
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions lib/net/imap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1120,17 +1120,16 @@ def auth_capable?(mechanism)
# password: proc { password ||= ui.prompt_for_password },
# oauth2_token: proc { accesstok ||= kms.fresh_access_token },
# }
# if auth_capable? "OAUTHBEARER"
# imap.authenticate "OAUTHBEARER", **creds # authcid, oauth2_token
# elsif auth_capable? "XOAUTH2"
# imap.authenticate "XOAUTH2", **creds # authcid, oauth2_token
# elsif auth_capable? "SCRAM-SHA-256"
# imap.authenticate "SCRAM-SHA-256", **creds # authcid, password
# elsif auth_capable? "PLAIN"
# imap.authenticate "PLAIN", **creds # authcid, password
# elsif auth_capable? "DIGEST-MD5"
# imap.authenticate "DIGEST-MD5", **creds # authcid, password
# elsif auth_capable? "LOGINDISABLED"
# mechanism = %w[
# OAUTHBEARER XOAUTH2
# SCRAM-SHA-256 SCRAM-SHA-1
# PLAIN
# ].find {|m|
# imap.auth_capable?(m)
# }
# if mechanism
# imap.authenticate mechanism, **creds
# elsif capable? "LOGINDISABLED"
# raise "the server has disabled login"
# else
# imap.login username, password
Expand Down

0 comments on commit b7c61c6

Please sign in to comment.