Permalink
Browse files

provide helper method service_account_sso_url for signed SSO urls

  • Loading branch information...
1 parent 716920a commit 0d5d593d7aa8c7d237085a6ecb3f63f61fb641db @jacobo jacobo committed Mar 16, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 fake/lib/ey_services_fake/mock_backend.rb
@@ -191,5 +191,20 @@ def send_invoice(invoices_url, total_amount_cent, line_item_description)
actor(:service_provider).send_invoice(invoices_url, total_amount_cent, line_item_description)
end
+ def service_account_sso_url
+ configuration_url = service_account[:pushed_service_account][:configuration_url]
+ params = {
+ 'timestamp' => Time.now.iso8601,
+ 'ey_user_id' => sso_user.id,
+ 'ey_user_name' => "Person Name",
+ 'ey_return_to_url' => "https://cloud.engineyard.com/dashboard",
+ 'access_level' => 'owner',
+ }
+ EY::ApiHMAC::SSO.sign(configuration_url,
+ params,
+ partner[:auth_id],
+ partner[:auth_key])
+ end
+
end
end

0 comments on commit 0d5d593

Please sign in to comment.