Skip to content

Instantly share code, notes, and snippets.

@Heavyblade
Created June 4, 2012 22:15
Show Gist options
  • Save Heavyblade/2871138 to your computer and use it in GitHub Desktop.
Save Heavyblade/2871138 to your computer and use it in GitHub Desktop.
def clientapp_register
begin
Timeout::timeout(7) do
resp = RestClient.get('http://' + Identity::Config.settings[:authorization_server] + '/consumer/clientapp/register', :params => params[:clientapp])
ClientApplication.create_from_key_manager_xml(resp, params[:clientapp])
success resp
end
rescue => e
Rails.logger.debug e.message
Rails.logger.debug e.http_body if e.respond_to?(:http_body)
Rails.logger.debug e.backtrace
failure e
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment