Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix channel API for when the appscale secret changes. #859

Merged
merged 4 commits into from
Jan 22, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion AppController/djinn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5219,7 +5219,14 @@ def start_xmpp_for_app(app, port, app_language)
uac = UserAppClient.new(@userappserver_public_ip, @@secret)
xmpp_user = "#{app}@#{login_ip}"
xmpp_pass = HelperFunctions.encrypt_password(xmpp_user, @@secret)
uac.commit_new_user(xmpp_user, xmpp_pass, "app")
result = uac.commit_new_user(xmpp_user, xmpp_pass, "app")
Djinn.log_debug("User creation returned: #{result}")
if result.include?('Error: user already exists')
# We need to update the password of the channel XMPP account for
# authorization.
result = uac.change_password(xmpp_user, xmpp_pass)
Djinn.log_debug("Change password returned: #{result}")
end

Djinn.log_debug("Created user [#{xmpp_user}] with password [#{@@secret}] and hashed password [#{xmpp_pass}]")

Expand Down
1 change: 1 addition & 0 deletions AppController/lib/user_app_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def commit_new_user(user, encrypted_password, user_type, retry_on_except=true)
else
puts "\n[unexpected] Commit new user returned: [#{result}]"
end
return result
end

def commit_new_app(user, app_name, language, file_location)
Expand Down