123456789_123456789_123456789_123456789_123456789_

Class: Net::IMAP::SASL::ScramSHA1Authenticator

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Net::IMAP::SASL::ScramAuthenticator
Defined in: lib/net/imap/sasl/scram_authenticator.rb

Overview

Authenticator for the “SCRAM-SHA-1::Net::IMAP::SASL mechanism, defined in RFC5802.

Uses the “SHA-1” digest algorithm from OpenSSL::Digest.

See ScramAuthenticator.

Constant Summary

GS2Header - Included

NO_NULL_CHARS, RFC5801_SASLNAME

Class Method Summary

ScramAuthenticator - Inherited

.new

Creates an authenticator for one of the “SCRAM-*::Net::IMAP::SASL mechanisms.

Instance Attribute Summary

ScramAuthenticator - Inherited

#authcid
#authzid

Authorization identity: an identity to act as or on behalf of.

#cnonce

The client nonce, generated by SecureRandom.

#done?

Is the authentication exchange complete?

#iterations

The iteration count for the selected hash function and user.

#min_iterations

The minimal allowed iteration count.

#password

A password or passphrase that matches the #username.

#salt

The salt used by the server for this user.

#secret
#server_error

An error reported by the server during the SASL exchange.

#snonce

The server nonce, which must start with #cnonce

#username

Authentication identity: the identity that matches the #password.

#server_first_message

Need to store this for auth_message.

Instance Method Summary

ScramAuthenticator - Inherited

#digest

Returns a new OpenSSL::Digest object, set to the appropriate hash function for the chosen mechanism.

#initial_client_response

See RFC5802 §7 client-first-message.

#process

responds to the server’s challenges.

#cbind_input
#client_final_message_without_proof

See RFC5802 §7 client-final-message-without-proof.

#client_first_message_bare

See RFC5802 §7 client-first-message-bare.

#final_message_with_proof

See RFC5802 §7 client-final-message.

#format_message,
#parse_challenge

RFC5802 specifies “that the order of attributes in client or server messages is fixed, with the exception of extension attributes”, but this parses it simply as a hash, without respect to order.

#recv_server_final_message, #recv_server_first_message

ScramAlgorithm - Included

GS2Header - Included

#gs2_authzid

The RFC5801 §4 gs2-authzid header, when #authzid is not empty.

#gs2_cb_flag

The RFC5801 §4 gs2-cb-flag:

#gs2_header

The RFC5801 §4 gs2-header, which prefixes the #initial_client_response.

#gs2_saslname_encode

Encodes str to match RFC5801_SASLNAME.

Constructor Details

This class inherits a constructor from Net::IMAP::SASL::ScramAuthenticator