Changeset 822e9bd
- Timestamp:
- Oct 15, 2011, 8:17:21 PM (14 years ago)
- Children:
- 87d7e14
- Parents:
- ef4074b
- git-author:
- Jed Davis <jld@panix.com> (10/15/11 19:57:06)
- git-committer:
- Jed Davis <jld@panix.com> (10/15/11 20:17:21)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/Jabber/lib/XML/Stream.pm
ra8d5a39 r822e9bd 2112 2112 2113 2113 return unless defined($mechanisms); 2114 2115 # Here we assume that if 'to' is available, then a domain is being 2116 # specified that does not match the hostname of the jabber server 2117 # and that we should use that to form the bare JID for SASL auth. 2118 my $domain .= $self->{SIDS}->{$sid}->{to} 2119 ? $self->{SIDS}->{$sid}->{to} 2120 : $self->{SIDS}->{$sid}->{hostname}; 2121 2122 my $authname = $username . '@' . $domain; 2114 2123 2115 2124 my $sasl = new Authen::SASL(mechanism=>join(" ",@{$mechanisms}), 2116 2125 callback=>{ 2117 # authname => $username."@".$self->{SIDS}->{$sid}->{hostname}, 2126 authname => $authname, 2127 2118 2128 user => $username, 2119 2129 pass => $password … … 2121 2131 ); 2122 2132 2123 $self->{SIDS}->{$sid}->{sasl}->{client} = $sasl->client_new('xmpp', $ self->{SIDS}->{$sid}->{hostname});2133 $self->{SIDS}->{$sid}->{sasl}->{client} = $sasl->client_new('xmpp', $domain); 2124 2134 $self->{SIDS}->{$sid}->{sasl}->{username} = $username; 2125 2135 $self->{SIDS}->{$sid}->{sasl}->{password} = $password;
Note: See TracChangeset
for help on using the changeset viewer.