HEX
Server: Apache
System: Windows NT MAGNETO-ARM 10.0 build 22000 (Windows 10) AMD64
User: Michel (0)
PHP: 7.4.7
Disabled: NONE
Upload Files
File: C:/Ruby27-x64/lib/ruby/gems/2.7.0/doc/net-imap-0.3.4/ri/Net/IMAP/authenticate-i.ri
U:RDoc::AnyMethod[iI"authenticate:ETI"Net::IMAP#authenticate;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph;	[I"oSends an {AUTHENTICATE command [IMAP4rev1 ยง6.2.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.2.2] ;TI"Kto authenticate the client.  If successful, the connection enters the ;TI""_authenticated_" state.;To:RDoc::Markup::BlankLineo;
;	[
I"O+mechanism+ is the name of the \SASL authentication mechanism to be used. ;TI"NAll other arguments are forwarded to the authenticator for the requested ;TI"Fmechanism.  The listed call signatures are suggestions.  <em>The ;TI"Kdocumentation for each individual mechanism must be consulted for its ;TI"specific parameters.</em>;T@o;
;	[I"OAn exception Net::IMAP::NoResponseError is raised if authentication fails.;T@o;
;	[I"Related: #login, #starttls;T@S:RDoc::Markup::Heading:
leveli	:	textI"Supported SASL Mechanisms;T@o:RDoc::Markup::List:
@type:	NOTE:@items[o:RDoc::Markup::ListItem:@label[I"+PLAIN+;T;	[o;
;	[I"See PlainAuthenticator. ;TI"2Login using clear-text username and password.;T@o;;[I"+XOAUTH2+;T;	[o;
;	[	I"See XOauth2Authenticator. ;TI"5Login using a username and OAuth2 access token. ;TI"=Non-standard and obsoleted by +OAUTHBEARER+, but widely ;TI"supported.;T@o:RDoc::Markup::BlockQuote;	[o;
;	[I"H*Deprecated:*  <em>Obsolete mechanisms are available for backwards ;TI"compatibility.</em>;T@o;
;	[I"1For +DIGEST-MD5+ see DigestMD5Authenticator.;T@o;
;	[I")For +LOGIN+, see LoginAuthenticator.;T@o;
;	[I".For +CRAM-MD5+, see CramMD5Authenticator.;T@o;
;	[I"@<em>Using a deprecated mechanism will print a warning.</em>;T@o;
;	[	I"BSee Net::IMAP::Authenticators for information on plugging in ;TI"Cauthenticators for other mechanisms.  See the {SASL mechanism ;TI"Wregistry}[https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml] ;TI"8for information on these and other SASL mechanisms.;T@S;;
i
;I"Capabilities;T@o;
;	[I"FClients MUST NOT attempt to authenticate with a mechanism unless ;TI"L<tt>"AUTH=#{mechanism}"</tt> for that mechanism is a server capability.;T@o;
;	[	I"PServer capabilities may change after #starttls, #login, and #authenticate. ;TI"LCached capabilities _must_ be invalidated after this method completes. ;TI"MThe TaggedResponse to #authenticate may include updated capabilities in ;TI"its ResponseCode.;T@S;;
i
;I"Example;To;
;	[I"OIf the authenticators ignore unhandled keyword arguments, the same config ;TI")can be used for multiple mechanisms:;T@o:RDoc::Markup::Verbatim;	[I"Epassword  = nil # saved locally, so we don't ask more than once
;TI"(accesstok = nil # saved locally...
;TI"creds = {
;TI"  authcid:      username,
;TI"D  password:     proc { password  ||= ui.prompt_for_password },
;TI"D  oauth2_token: proc { accesstok ||= kms.fresh_access_token },
;TI"}
;TI"capa = imap.capability
;TI",if    capa.include? "AUTH=OAUTHBEARER"
;TI"J  imap.authenticate "OAUTHBEARER",   **creds # authcid, oauth2_token
;TI"(elsif capa.include? "AUTH=XOAUTH2"
;TI"J  imap.authenticate "XOAUTH2",       **creds # authcid, oauth2_token
;TI".elsif capa.include? "AUTH=SCRAM-SHA-256"
;TI"F  imap.authenticate "SCRAM-SHA-256", **creds # authcid, password
;TI"&elsif capa.include? "AUTH=PLAIN"
;TI"F  imap.authenticate "PLAIN",         **creds # authcid, password
;TI"+elsif capa.include? "AUTH=DIGEST-MD5"
;TI"F  imap.authenticate "DIGEST-MD5",    **creds # authcid, password
;TI")elsif capa.include? "LOGINDISABLED"
;TI"-  raise "the server has disabled login"
;TI"
else
;TI"%  imap.login username, password
;TI"end;T:@format0:
@fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below0I"^authenticate(mechanism, ...)                               -> ok_resp
authenticate(mech, *creds, **props) {|prop, auth| val }    -> ok_resp
authenticate(mechanism, authnid, credentials, authzid=nil) -> ok_resp
authenticate(mechanism, **properties)                      -> ok_resp
authenticate(mechanism) {|propname, authctx| prop_value }  -> ok_resp
;T0[I"%(mechanism, *args, **props, &cb);T@wFI"	IMAP;TcRDoc::NormalClass00