@@ -21,7 +21,7 @@ class AnonymousAuthenticator
21
21
# #anonymous_message is an optional message which is sent to the server.
22
22
# It may be sent as a positional argument or as a keyword argument.
23
23
#
24
- # Any other keyword parameters are quietly ignored.
24
+ # Any other keyword arguments are silently ignored.
25
25
def initialize ( anon_msg = nil , anonymous_message : nil , **)
26
26
message = ( anonymous_message || anon_msg || "" ) . to_str
27
27
@anonymous_message = StringPrep ::Trace . stringprep_trace message
@@ -31,14 +31,15 @@ def initialize(anon_msg = nil, anonymous_message: nil, **)
31
31
end
32
32
end
33
33
34
- # A token sent for the +ANONYMOUS+ mechanism.
34
+ # An optional token sent for the +ANONYMOUS+ mechanism., up to 255 UTF-8
35
+ # characters in length.
35
36
#
36
37
# If it contains an "@" sign, the message must be a valid email address
37
38
# (+addr-spec+ from RFC-2822[https://tools.ietf.org/html/rfc2822]).
38
39
# Email syntax is _not_ validated by AnonymousAuthenticator.
39
40
#
40
41
# Otherwise, it can be any UTF8 string which is permitted by the
41
- # StringPrep::Trace profile, up to 255 UTF-8 characters in length .
42
+ # StringPrep::Trace profile.
42
43
attr_reader :anonymous_message
43
44
44
45
# :call-seq:
@@ -48,7 +49,9 @@ def initialize(anon_msg = nil, anonymous_message: nil, **)
48
49
def initial_response? ; true end
49
50
50
51
# Returns #anonymous_message.
51
- def process ( _server_challenge_string ) anonymous_message end
52
+ def process ( _server_challenge_string )
53
+ anonymous_message
54
+ end
52
55
53
56
end
54
57
end
0 commit comments