diff --git a/Gemfile.lock b/Gemfile.lock index 87cbc611..91aeb76c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - workos (0.1.0) + workos (0.1.1) sorbet-runtime (~> 0.5) GEM @@ -56,7 +56,7 @@ GEM simplecov-html (0.10.2) sorbet (0.5.5181) sorbet-static (= 0.5.5181) - sorbet-runtime (0.5.5182) + sorbet-runtime (0.5.5373) sorbet-static (0.5.5181-universal-darwin-14) unicode-display_width (1.6.0) url (0.3.2) diff --git a/docs/WorkOS.html b/docs/WorkOS.html index c9b9a2a5..770d7e2a 100644 --- a/docs/WorkOS.html +++ b/docs/WorkOS.html @@ -88,7 +88,7 @@
typed: strict
+Use the WorkOS module to authenticate your requests to the WorkOS API. The gem will read your API key automatically from the ENV var `WORKOS_KEY`. Alternatively, you can set the key yourself with `WorkOS.key = [your api key]` somewhere in the load path of your application, such as an initializer.
'api.workos.com'
ENV['WORKOS_API_HOSTNAME'] || 'api.workos.com'
'0.1.0'
'0.1.1'
The Base class handles setting and reading the WorkOS API Key for authentication
+ +-13 -14 -15+15 +16 +17
# File 'lib/workos/base.rb', line 13 +# File 'lib/workos/base.rb', line 15 def key @key @@ -245,12 +256,12 @@
-7 -8 -9+9 +10 +11
# File 'lib/workos/base.rb', line 7 +# File 'lib/workos/base.rb', line 9 def key @key @@ -266,7 +277,7 @@diff --git a/docs/WorkOS/Client.html b/docs/WorkOS/Client.html index 4fd3b37f..e3c21979 100644 --- a/docs/WorkOS/Client.html +++ b/docs/WorkOS/Client.html @@ -98,7 +98,18 @@ +
Overview
++ @@ -249,17 +260,17 @@+ ++A Net::HTTP based API client for interacting with the WorkOS API
+ +
-11 12 13 14 15 16 17 -18+18 +19
# File 'lib/workos/client.rb', line 11 +# File 'lib/workos/client.rb', line 12 def client return @client if defined?(@client) @@ -289,17 +300,17 @@
-21 22 23 24 25 26 27 -28+28 +29
# File 'lib/workos/client.rb', line 21 +# File 'lib/workos/client.rb', line 22 def execute_request(request:) response = client.request(request) @@ -329,7 +340,6 @@
-53 54 55 56 @@ -358,10 +368,11 @@+82 +8379 80 81 -82
# File 'lib/workos/client.rb', line 53 +# File 'lib/workos/client.rb', line 54 def handle_error_response(response:) http_status = response.code.to_i @@ -413,15 +424,15 @@
-31 32 33 34 35 -36+36 +37
# File 'lib/workos/client.rb', line 31 +# File 'lib/workos/client.rb', line 32 def post_request(path:, body: nil) request = Net::HTTP::Post.new(path, 'Content-Type' => 'application/json') @@ -449,7 +460,6 @@
-39 40 41 42 @@ -458,10 +468,11 @@+48 +4945 46 47 -48
# File 'lib/workos/client.rb', line 39 +# File 'lib/workos/client.rb', line 40 def user_agent engine = defined?(::RUBY_ENGINE) ? ::RUBY_ENGINE : 'Ruby' @@ -483,7 +494,7 @@diff --git a/docs/WorkOS/InvalidRequestError.html b/docs/WorkOS/InvalidRequestError.html index 3fd90e5d..cbc530f6 100644 --- a/docs/WorkOS/InvalidRequestError.html +++ b/docs/WorkOS/InvalidRequestError.html @@ -150,7 +150,7 @@
Constructor Details
diff --git a/docs/WorkOS/Profile.html b/docs/WorkOS/Profile.html index 7598f0ff..6d4dfeeb 100644 --- a/docs/WorkOS/Profile.html +++ b/docs/WorkOS/Profile.html @@ -778,7 +778,7 @@diff --git a/docs/WorkOS/SSO.html b/docs/WorkOS/SSO.html index f2d7d2c2..621f461a 100644 --- a/docs/WorkOS/SSO.html +++ b/docs/WorkOS/SSO.html @@ -187,6 +187,30 @@
Fetch the profile details for the authenticated SSO user.
+ + + +
Promote a DraftConnection created via IdP Link Embed such that the Enterprise users can begin signing into your application.
+Promote a DraftConnection created via IdP Link Embed such that the Enterprise users can begin signing into your application.
+ +you by the IdP Link Embed
+ + +
+ + + +142 +143 +144 +145 +146 +147 +148 +149 +150+ |
+
+ # File 'lib/workos/sso.rb', line 142 + +def promote_draft_connection(token:) + request = bearer_post_request( + path: "/draft_connections/#{token}/activate", + ) + + response = client.request(request) + + response.is_a? Net::HTTPSuccess +end+ |
+
rubocop:disable Style/Documentation
+Parent class for WorkOS related errors
-19 20 21 22 -23+23 +24
# File 'lib/workos/errors.rb', line 19 +# File 'lib/workos/errors.rb', line 20 def initialize(message: nil, http_status: nil, request_id: nil) @message = @@ -333,12 +333,12 @@
-9 10 -11+11 +12
# File 'lib/workos/errors.rb', line 9 +# File 'lib/workos/errors.rb', line 10 def http_status @http_status @@ -376,12 +376,12 @@
-10 11 -12+12 +13
# File 'lib/workos/errors.rb', line 10 +# File 'lib/workos/errors.rb', line 11 def request_id @request_id @@ -413,14 +413,14 @@
-26 27 28 29 -30+30 +31
# File 'lib/workos/errors.rb', line 26 +# File 'lib/workos/errors.rb', line 27 def to_s status_string = @http_status.nil? ? '' : "Status #{@http_status}, " @@ -437,7 +437,7 @@diff --git a/docs/file.README.html b/docs/file.README.html index 590359ad..93586f6d 100644 --- a/docs/file.README.html +++ b/docs/file.README.html @@ -242,7 +242,7 @@
The SSO Module
diff --git a/docs/index.html b/docs/index.html index 81fef4f4..bbea5bb5 100644 --- a/docs/index.html +++ b/docs/index.html @@ -240,7 +240,7 @@Namespace Listing A-Z
diff --git a/docs/method_list.html b/docs/method_list.html index 285326d5..f05ad726 100644 --- a/docs/method_list.html +++ b/docs/method_list.html @@ -166,7 +166,7 @@Method List