@@ -33,6 +33,16 @@ class IMAP
33
33
# +PLAIN+:: See PlainAuthenticator.
34
34
# Login using clear-text username and password.
35
35
#
36
+ # +SCRAM-SHA-1+, +SCRAM-SHA-256+::
37
+ # See ScramAuthenticator.
38
+ # Login by username and password. The password is not sent
39
+ # to the server but is used in a salted challenge/response
40
+ # exchange. One of the benefits over +PLAIN+ is that the
41
+ # server cannot impersonate the user to other servers.
42
+ # +SCRAM-SHA-1+ and +SCRAM-SHA-256+ are supported, but any
43
+ # algorithm supported by OpenSSL::Digest can easily be
44
+ # added.
45
+ #
36
46
# +OAUTHBEARER+:: See OAuthBearerAuthenticator.
37
47
# Login using an OAUTH2 Bearer token. This is the
38
48
# standard mechanism for using OAuth2 with \SASL, but it
@@ -77,10 +87,15 @@ module SASL
77
87
autoload :Authenticator , "#{ sasl_dir } /authenticator"
78
88
autoload :Authenticators , "#{ sasl_dir } /authenticators"
79
89
autoload :GS2Header , "#{ sasl_dir } /gs2_header"
90
+ autoload :ScramAlgorithm , "#{ sasl_dir } /scram_algorithm"
91
+ autoload :ScramAuthenticator , "#{ sasl_dir } /scram_authenticator"
92
+
80
93
autoload :AnonymousAuthenticator , "#{ sasl_dir } /anonymous_authenticator"
81
94
autoload :ExternalAuthenticator , "#{ sasl_dir } /external_authenticator"
82
95
autoload :OAuthBearerAuthenticator , "#{ sasl_dir } /oauthbearer_authenticator"
83
96
autoload :PlainAuthenticator , "#{ sasl_dir } /plain_authenticator"
97
+ autoload :ScramSHA1Authenticator , "#{ sasl_dir } /scram_sha1_authenticator"
98
+ autoload :ScramSHA256Authenticator , "#{ sasl_dir } /scram_sha256_authenticator"
84
99
autoload :XOAuth2Authenticator , "#{ sasl_dir } /xoauth2_authenticator"
85
100
86
101
autoload :CramMD5Authenticator , "#{ sasl_dir } /cram_md5_authenticator"
@@ -94,6 +109,8 @@ def self.authenticators
94
109
registry . add_authenticator "External"
95
110
registry . add_authenticator "OAuthBearer"
96
111
registry . add_authenticator "Plain"
112
+ registry . add_authenticator "Scram-SHA-1"
113
+ registry . add_authenticator "Scram-SHA-256"
97
114
registry . add_authenticator "XOAuth2"
98
115
registry . add_authenticator "Login" # deprecated
99
116
registry . add_authenticator "Cram-MD5" # deprecated
0 commit comments