workosv2 2.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.github/CODEOWNERS +5 -0
- data/.github/pull_request_template.md +11 -0
- data/.github/renovate.json +5 -0
- data/.gitignore +49 -0
- data/.rspec +1 -0
- data/.rubocop.yml +24 -0
- data/.ruby-version +1 -0
- data/.semaphore/rubygems.yml +24 -0
- data/.semaphore/semaphore.yml +51 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +126 -0
- data/Gemfile.lock.old +127 -0
- data/LICENSE +21 -0
- data/README.md +53 -0
- data/bin/build +3 -0
- data/bin/console +3 -0
- data/bin/docs +5 -0
- data/bin/publish +3 -0
- data/bin/tapioca +29 -0
- data/codecov.yml +12 -0
- data/docs/WorkOS/APIError.html +160 -0
- data/docs/WorkOS/AuditLog.html +235 -0
- data/docs/WorkOS/AuditTrail.html +235 -0
- data/docs/WorkOS/AuthenticationError.html +160 -0
- data/docs/WorkOS/Base.html +287 -0
- data/docs/WorkOS/Client.html +504 -0
- data/docs/WorkOS/InvalidRequestError.html +160 -0
- data/docs/WorkOS/Profile.html +788 -0
- data/docs/WorkOS/RequestError.html +135 -0
- data/docs/WorkOS/SSO.html +691 -0
- data/docs/WorkOS/Types/ProfileStruct.html +135 -0
- data/docs/WorkOS/Types/Provider.html +135 -0
- data/docs/WorkOS/Types.html +128 -0
- data/docs/WorkOS/WorkOSError.html +447 -0
- data/docs/WorkOS.html +324 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +496 -0
- data/docs/file.README.html +252 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +250 -0
- data/docs/js/app.js +314 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +267 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/workosv2/audit_log_export.rb +55 -0
- data/lib/workosv2/audit_logs.rb +114 -0
- data/lib/workosv2/audit_trail.rb +111 -0
- data/lib/workosv2/challenge.rb +55 -0
- data/lib/workosv2/client.rb +186 -0
- data/lib/workosv2/configuration.rb +17 -0
- data/lib/workosv2/connection.rb +66 -0
- data/lib/workosv2/deprecated_hash_wrapper.rb +76 -0
- data/lib/workosv2/directory.rb +65 -0
- data/lib/workosv2/directory_group.rb +68 -0
- data/lib/workosv2/directory_sync.rb +218 -0
- data/lib/workosv2/directory_user.rb +97 -0
- data/lib/workosv2/errors.rb +81 -0
- data/lib/workosv2/event.rb +51 -0
- data/lib/workosv2/events.rb +52 -0
- data/lib/workosv2/factor.rb +54 -0
- data/lib/workosv2/hash_provider.rb +19 -0
- data/lib/workosv2/mfa.rb +178 -0
- data/lib/workosv2/organization.rb +57 -0
- data/lib/workosv2/organizations.rb +188 -0
- data/lib/workosv2/passwordless.rb +85 -0
- data/lib/workosv2/portal.rb +66 -0
- data/lib/workosv2/profile.rb +76 -0
- data/lib/workosv2/profile_and_token.rb +29 -0
- data/lib/workosv2/sso.rb +297 -0
- data/lib/workosv2/types/audit_log_export_struct.rb +17 -0
- data/lib/workosv2/types/challenge_struct.rb +18 -0
- data/lib/workosv2/types/connection_struct.rb +20 -0
- data/lib/workosv2/types/directory_group_struct.rb +19 -0
- data/lib/workosv2/types/directory_struct.rb +19 -0
- data/lib/workosv2/types/directory_user_struct.rb +26 -0
- data/lib/workosv2/types/event_struct.rb +15 -0
- data/lib/workosv2/types/factor_struct.rb +18 -0
- data/lib/workosv2/types/intent_enum.rb +17 -0
- data/lib/workosv2/types/list_struct.rb +13 -0
- data/lib/workosv2/types/organization_struct.rb +17 -0
- data/lib/workosv2/types/passwordless_session_struct.rb +17 -0
- data/lib/workosv2/types/profile_struct.rb +21 -0
- data/lib/workosv2/types/provider_enum.rb +15 -0
- data/lib/workosv2/types/verify_challenge_struct.rb +13 -0
- data/lib/workosv2/types/webhook_struct.rb +15 -0
- data/lib/workosv2/types.rb +25 -0
- data/lib/workosv2/verify_challenge.rb +39 -0
- data/lib/workosv2/version.rb +6 -0
- data/lib/workosv2/webhook.rb +51 -0
- data/lib/workosv2/webhooks.rb +217 -0
- data/lib/workosv2.rb +79 -0
- data/sorbet/config +2 -0
- data/sorbet/rbi/gems/addressable@2.8.0.rbi +290 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +54 -0
- data/sorbet/rbi/gems/codecov@0.2.12.rbi +55 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
- data/sorbet/rbi/gems/crack@0.4.5.rbi +57 -0
- data/sorbet/rbi/gems/diff-lcs@1.4.4.rbi +185 -0
- data/sorbet/rbi/gems/docile@1.3.5.rbi +54 -0
- data/sorbet/rbi/gems/hashdiff@1.0.1.rbi +82 -0
- data/sorbet/rbi/gems/json@2.5.1.rbi +109 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +8 -0
- data/sorbet/rbi/gems/parallel@1.20.1.rbi +113 -0
- data/sorbet/rbi/gems/parser@3.0.1.0.rbi +1187 -0
- data/sorbet/rbi/gems/pry@0.14.2.rbi +8 -0
- data/sorbet/rbi/gems/public_suffix@4.0.6.rbi +146 -0
- data/sorbet/rbi/gems/rainbow@3.0.0.rbi +153 -0
- data/sorbet/rbi/gems/rake@13.0.3.rbi +807 -0
- data/sorbet/rbi/gems/rbi@0.0.16.rbi +2118 -0
- data/sorbet/rbi/gems/regexp_parser@2.1.1.rbi +1117 -0
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +709 -0
- data/sorbet/rbi/gems/rspec-core@3.9.3.rbi +2467 -0
- data/sorbet/rbi/gems/rspec-expectations@3.9.4.rbi +1569 -0
- data/sorbet/rbi/gems/rspec-mocks@3.9.1.rbi +1493 -0
- data/sorbet/rbi/gems/rspec-support@3.9.4.rbi +511 -0
- data/sorbet/rbi/gems/rspec@3.9.0.rbi +38 -0
- data/sorbet/rbi/gems/rubocop-ast@1.4.1.rbi +1881 -0
- data/sorbet/rbi/gems/rubocop@0.93.1.rbi +11497 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +405 -0
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +89 -0
- data/sorbet/rbi/gems/simplecov@0.21.2.rbi +577 -0
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.2.rbi +8 -0
- data/sorbet/rbi/gems/spoom@1.1.15.rbi +1549 -0
- data/sorbet/rbi/gems/tapioca@0.7.3.rbi +1718 -0
- data/sorbet/rbi/gems/thor@1.2.1.rbi +844 -0
- data/sorbet/rbi/gems/unicode-display_width@1.7.0.rbi +22 -0
- data/sorbet/rbi/gems/unparser@0.6.2.rbi +8 -0
- data/sorbet/rbi/gems/vcr@5.0.0.rbi +699 -0
- data/sorbet/rbi/gems/webmock@3.12.2.rbi +662 -0
- data/sorbet/rbi/gems/yard-sorbet@0.8.0.rbi +268 -0
- data/sorbet/rbi/gems/yard@0.9.26.rbi +4048 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- data/spec/lib/workos/audit_logs_spec.rb +151 -0
- data/spec/lib/workos/audit_trail_spec.rb +146 -0
- data/spec/lib/workos/configuration_spec.rb +61 -0
- data/spec/lib/workos/directory_sync_spec.rb +492 -0
- data/spec/lib/workos/directory_user_spec.rb +36 -0
- data/spec/lib/workos/event_spec.rb +88 -0
- data/spec/lib/workos/mfa_spec.rb +281 -0
- data/spec/lib/workos/organizations_spec.rb +257 -0
- data/spec/lib/workos/passwordless_spec.rb +77 -0
- data/spec/lib/workos/portal_spec.rb +87 -0
- data/spec/lib/workos/sso_spec.rb +650 -0
- data/spec/lib/workos/webhooks_spec.rb +236 -0
- data/spec/spec_helper.rb +56 -0
- data/spec/support/fixtures/vcr_cassettes/audit_logs/create_event.yml +59 -0
- data/spec/support/fixtures/vcr_cassettes/audit_logs/create_event_custom_idempotency_key.yml +60 -0
- data/spec/support/fixtures/vcr_cassettes/audit_logs/create_event_invalid.yml +59 -0
- data/spec/support/fixtures/vcr_cassettes/audit_logs/create_export.yml +76 -0
- data/spec/support/fixtures/vcr_cassettes/audit_logs/create_export_with_filters.yml +77 -0
- data/spec/support/fixtures/vcr_cassettes/audit_logs/get_export.yml +73 -0
- data/spec/support/fixtures/vcr_cassettes/audit_trail/create_event.yml +65 -0
- data/spec/support/fixtures/vcr_cassettes/audit_trail/create_event_custom_idempotency_key.yml +67 -0
- data/spec/support/fixtures/vcr_cassettes/audit_trail/create_event_invalid.yml +68 -0
- data/spec/support/fixtures/vcr_cassettes/audit_trail/create_events_duplicate_idempotency_key_and_payload.yml +131 -0
- data/spec/support/fixtures/vcr_cassettes/audit_trail/create_events_duplicate_idempotency_key_different_payload.yml +134 -0
- data/spec/support/fixtures/vcr_cassettes/audit_trail/get_events.yml +61 -0
- data/spec/support/fixtures/vcr_cassettes/base/execute_request_unauthenticated.yml +66 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/delete_directory.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/get_directory_with_invalid_id.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/get_directory_with_valid_id.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/get_group.yml +80 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/get_group_with_invalid_id.yml +62 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/get_user.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/get_user_with_invalid_id.yml +62 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_after.yml +87 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_before.yml +89 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_domain.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_limit.yml +85 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_no_options.yml +93 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_directories/with_search.yml +85 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_after.yml +90 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_before.yml +90 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_directory.yml +90 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_limit.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_no_options.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_groups/with_user.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_after.yml +186 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_before.yml +88 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_directory.yml +194 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_group.yml +186 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_limit.yml +189 -0
- data/spec/support/fixtures/vcr_cassettes/directory_sync/list_users/with_no_options.yml +74 -0
- data/spec/support/fixtures/vcr_cassettes/events/list_events_with_after.yml +80 -0
- data/spec/support/fixtures/vcr_cassettes/events/list_events_with_event.yml +80 -0
- data/spec/support/fixtures/vcr_cassettes/events/list_events_with_no_options.yml +80 -0
- data/spec/support/fixtures/vcr_cassettes/events/list_events_with_range.yml +80 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_generic_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_sms_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/challenge_factor_totp_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/delete_factor.yml +80 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_generic_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_sms_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/enroll_factor_totp_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/get_factor_invalid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/get_factor_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/verify_challenge_generic_expired.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/verify_challenge_generic_invalid.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/verify_challenge_generic_valid.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/mfa/verify_challenge_generic_valid_is_false.yml +82 -0
- data/spec/support/fixtures/vcr_cassettes/organization/create.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/organization/create_invalid.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/organization/create_with_duplicate_idempotency_key_and_different_payload.yml +155 -0
- data/spec/support/fixtures/vcr_cassettes/organization/create_with_duplicate_idempotency_key_and_payload.yml +154 -0
- data/spec/support/fixtures/vcr_cassettes/organization/create_with_idempotency_key.yml +79 -0
- data/spec/support/fixtures/vcr_cassettes/organization/delete.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/organization/delete_invalid.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/organization/get.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/organization/get_invalid.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/organization/list.yml +87 -0
- data/spec/support/fixtures/vcr_cassettes/organization/update.yml +84 -0
- data/spec/support/fixtures/vcr_cassettes/passwordless/create_session.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/passwordless/create_session_invalid.yml +73 -0
- data/spec/support/fixtures/vcr_cassettes/passwordless/send_session.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/passwordless/send_session_invalid.yml +73 -0
- data/spec/support/fixtures/vcr_cassettes/portal/generate_link_audit_logs.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/portal/generate_link_dsync.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/portal/generate_link_invalid.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/portal/generate_link_sso.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/sso/delete_connection_with_invalid_id.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/sso/delete_connection_with_valid_id.yml +70 -0
- data/spec/support/fixtures/vcr_cassettes/sso/get_connection_with_invalid_id.yml +72 -0
- data/spec/support/fixtures/vcr_cassettes/sso/get_connection_with_valid_id.yml +86 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_after.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_before.yml +86 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_connection_type.yml +90 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_domain.yml +86 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_limit.yml +83 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_no_options.yml +89 -0
- data/spec/support/fixtures/vcr_cassettes/sso/list_connections/with_organization_id.yml +86 -0
- data/spec/support/fixtures/vcr_cassettes/sso/profile.yml +74 -0
- data/spec/support/profile.txt +1 -0
- data/spec/support/shared_examples/client_spec.rb +30 -0
- data/spec/support/webhook_payload.txt +1 -0
- data/workosv2.gemspec +38 -0
- metadata +531 -0
@@ -0,0 +1,691 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Module: WorkOS::SSO
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.22
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "WorkOS::SSO";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (S)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../WorkOS.html" title="WorkOS (module)">WorkOS</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">SSO</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Module: WorkOS::SSO
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
<dl>
|
73
|
+
<dt>Extended by:</dt>
|
74
|
+
<dd>T::Sig, <span class='object_link'><a href="Base.html" title="WorkOS::Base (module)">Base</a></span>, <span class='object_link'><a href="Client.html" title="WorkOS::Client (module)">Client</a></span></dd>
|
75
|
+
</dl>
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
<dl>
|
85
|
+
<dt>Defined in:</dt>
|
86
|
+
<dd>lib/workosv2/sso.rb</dd>
|
87
|
+
</dl>
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
<h2>Overview</h2><div class="docstring">
|
92
|
+
<div class="discussion">
|
93
|
+
|
94
|
+
<p>The SSO module provides convenience methods for working with the WorkOS SSO platform. You'll need a valid API key, a client ID, and to have created an SSO connection on your WorkOS dashboard.</p>
|
95
|
+
|
96
|
+
|
97
|
+
</div>
|
98
|
+
</div>
|
99
|
+
<div class="tags">
|
100
|
+
|
101
|
+
|
102
|
+
<p class="tag_title">See Also:</p>
|
103
|
+
<ul class="see">
|
104
|
+
|
105
|
+
<li><a href="https://docs.workos.com/sso/overview" target="_parent" title="https://docs.workos.com/sso/overview">https://docs.workos.com/sso/overview</a></li>
|
106
|
+
|
107
|
+
</ul>
|
108
|
+
|
109
|
+
</div>
|
110
|
+
|
111
|
+
<h2>
|
112
|
+
Constant Summary
|
113
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
114
|
+
</h2>
|
115
|
+
|
116
|
+
<dl class="constants">
|
117
|
+
|
118
|
+
<dt id="PROVIDERS-constant" class="">PROVIDERS =
|
119
|
+
|
120
|
+
</dt>
|
121
|
+
<dd><pre class="code"><span class='const'><span class='object_link'><a href="../WorkOS.html" title="WorkOS (module)">WorkOS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Types.html" title="WorkOS::Types (module)">Types</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Types/Provider.html" title="WorkOS::Types::Provider (class)">Provider</a></span></span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:serialize</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
|
122
|
+
|
123
|
+
</dl>
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
<h2>Instance Attribute Summary</h2>
|
132
|
+
|
133
|
+
<h3 class="inherited">Attributes included from <span class='object_link'><a href="Base.html" title="WorkOS::Base (module)">Base</a></span></h3>
|
134
|
+
<p class="inherited"><span class='object_link'><a href="Base.html#key-instance_method" title="WorkOS::Base#key (method)">#key</a></span></p>
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
<h2>
|
139
|
+
Class Method Summary
|
140
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
141
|
+
</h2>
|
142
|
+
|
143
|
+
<ul class="summary">
|
144
|
+
|
145
|
+
<li class="public ">
|
146
|
+
<span class="summary_signature">
|
147
|
+
|
148
|
+
<a href="#authorization_url-class_method" title="authorization_url (class method)">.<strong>authorization_url</strong>(client_id:, redirect_uri:, domain: nil, provider: nil, state: {}) ⇒ String </a>
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
</span>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
<span class="summary_desc"><div class='inline'>
|
163
|
+
<p>Generate an Oauth2 authorization URL where your users will authenticate using the configured SSO Identity Provider.</p>
|
164
|
+
</div></span>
|
165
|
+
|
166
|
+
</li>
|
167
|
+
|
168
|
+
|
169
|
+
<li class="public ">
|
170
|
+
<span class="summary_signature">
|
171
|
+
|
172
|
+
<a href="#profile-class_method" title="profile (class method)">.<strong>profile</strong>(code:, client_id:) ⇒ WorkOS::Profile </a>
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
</span>
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
<span class="summary_desc"><div class='inline'>
|
187
|
+
<p>Fetch the profile details for the authenticated SSO user.</p>
|
188
|
+
</div></span>
|
189
|
+
|
190
|
+
</li>
|
191
|
+
|
192
|
+
|
193
|
+
<li class="public ">
|
194
|
+
<span class="summary_signature">
|
195
|
+
|
196
|
+
<a href="#promote_draft_connection-class_method" title="promote_draft_connection (class method)">.<strong>promote_draft_connection</strong>(token:) ⇒ Bool </a>
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
</span>
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
<span class="summary_desc"><div class='inline'>
|
211
|
+
<p>Promote a DraftConnection created via the WorkOS.js embed such that the Enterprise users can begin signing into your application.</p>
|
212
|
+
</div></span>
|
213
|
+
|
214
|
+
</li>
|
215
|
+
|
216
|
+
|
217
|
+
</ul>
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="Client.html" title="WorkOS::Client (module)">Client</a></span></h3>
|
230
|
+
<p class="inherited"><span class='object_link'><a href="Client.html#client-instance_method" title="WorkOS::Client#client (method)">client</a></span>, <span class='object_link'><a href="Client.html#execute_request-instance_method" title="WorkOS::Client#execute_request (method)">execute_request</a></span>, <span class='object_link'><a href="Client.html#handle_error_response-instance_method" title="WorkOS::Client#handle_error_response (method)">handle_error_response</a></span>, <span class='object_link'><a href="Client.html#post_request-instance_method" title="WorkOS::Client#post_request (method)">post_request</a></span>, <span class='object_link'><a href="Client.html#user_agent-instance_method" title="WorkOS::Client#user_agent (method)">user_agent</a></span></p>
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
<div id="class_method_details" class="method_details_list">
|
244
|
+
<h2>Class Method Details</h2>
|
245
|
+
|
246
|
+
|
247
|
+
<div class="method_details first">
|
248
|
+
<h3 class="signature first" id="authorization_url-class_method">
|
249
|
+
|
250
|
+
.<strong>authorization_url</strong>(client_id:, redirect_uri:, domain: nil, provider: nil, state: {}) ⇒ <tt>String</tt>
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
</h3><div class="docstring">
|
257
|
+
<div class="discussion">
|
258
|
+
|
259
|
+
<p>Generate an Oauth2 authorization URL where your users will authenticate using the configured SSO Identity Provider.</p>
|
260
|
+
|
261
|
+
|
262
|
+
</div>
|
263
|
+
</div>
|
264
|
+
<div class="tags">
|
265
|
+
|
266
|
+
<div class="examples">
|
267
|
+
<p class="tag_title">Examples:</p>
|
268
|
+
|
269
|
+
|
270
|
+
<pre class="example code"><code>WorkOS::SSO.authorization_url(
|
271
|
+
domain: 'acme.com',
|
272
|
+
client_id: 'project_01DG5TGK363GRVXP3ZS40WNGEZ',
|
273
|
+
redirect_uri: 'https://workos.com/callback',
|
274
|
+
state: {
|
275
|
+
next_page: '/docs'
|
276
|
+
}
|
277
|
+
)
|
278
|
+
|
279
|
+
=> "https://api.workos.com/sso/authorize?domain=acme.com" \
|
280
|
+
"&client_id=project_01DG5TGK363GRVXP3ZS40WNGEZ" \
|
281
|
+
"&redirect_uri=https%3A%2F%2Fworkos.com%2Fcallback&" \
|
282
|
+
"response_type=code&state=%7B%3Anext_page%3D%3E%22%2Fdocs%22%7D"</code></pre>
|
283
|
+
|
284
|
+
</div>
|
285
|
+
<p class="tag_title">Parameters:</p>
|
286
|
+
<ul class="param">
|
287
|
+
|
288
|
+
<li>
|
289
|
+
|
290
|
+
<span class='name'>domain</span>
|
291
|
+
|
292
|
+
|
293
|
+
<span class='type'>(<tt>String</tt>)</span>
|
294
|
+
|
295
|
+
|
296
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
297
|
+
|
298
|
+
|
299
|
+
—
|
300
|
+
<div class='inline'>
|
301
|
+
<p>The domain for the relevant SSO Connection configured on your WorkOS dashboard. One of provider or domain is required</p>
|
302
|
+
</div>
|
303
|
+
|
304
|
+
</li>
|
305
|
+
|
306
|
+
<li>
|
307
|
+
|
308
|
+
<span class='name'>provider</span>
|
309
|
+
|
310
|
+
|
311
|
+
<span class='type'>(<tt>String</tt>)</span>
|
312
|
+
|
313
|
+
|
314
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
315
|
+
|
316
|
+
|
317
|
+
—
|
318
|
+
<div class='inline'>
|
319
|
+
<p>A provider name for an Identity Provider configured on your WorkOS dashboard. Only 'Google' is supported.</p>
|
320
|
+
</div>
|
321
|
+
|
322
|
+
</li>
|
323
|
+
|
324
|
+
<li>
|
325
|
+
|
326
|
+
<span class='name'>client_id</span>
|
327
|
+
|
328
|
+
|
329
|
+
<span class='type'>(<tt>String</tt>)</span>
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
—
|
334
|
+
<div class='inline'>
|
335
|
+
<p>The WorkOS client ID for the environment where you've configured your SSO connection.</p>
|
336
|
+
</div>
|
337
|
+
|
338
|
+
</li>
|
339
|
+
|
340
|
+
<li>
|
341
|
+
|
342
|
+
<span class='name'>redirect_uri</span>
|
343
|
+
|
344
|
+
|
345
|
+
<span class='type'>(<tt>String</tt>)</span>
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
—
|
350
|
+
<div class='inline'>
|
351
|
+
<p>The URI where users are directed after completing the authentication step. Must match a configured redirect URI on your WorkOS dashboard.</p>
|
352
|
+
</div>
|
353
|
+
|
354
|
+
</li>
|
355
|
+
|
356
|
+
<li>
|
357
|
+
|
358
|
+
<span class='name'>state</span>
|
359
|
+
|
360
|
+
|
361
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
362
|
+
|
363
|
+
|
364
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
365
|
+
|
366
|
+
|
367
|
+
—
|
368
|
+
<div class='inline'>
|
369
|
+
<p>An aribtrary state object that is preserved and available to the client in the response.</p>
|
370
|
+
</div>
|
371
|
+
|
372
|
+
</li>
|
373
|
+
|
374
|
+
</ul>
|
375
|
+
|
376
|
+
<p class="tag_title">Returns:</p>
|
377
|
+
<ul class="return">
|
378
|
+
|
379
|
+
<li>
|
380
|
+
|
381
|
+
|
382
|
+
<span class='type'>(<tt>String</tt>)</span>
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
</li>
|
387
|
+
|
388
|
+
</ul>
|
389
|
+
|
390
|
+
</div><table class="source_code">
|
391
|
+
<tr>
|
392
|
+
<td>
|
393
|
+
<pre class="lines">
|
394
|
+
|
395
|
+
|
396
|
+
62
|
397
|
+
63
|
398
|
+
64
|
399
|
+
65
|
400
|
+
66
|
401
|
+
67
|
402
|
+
68
|
403
|
+
69
|
404
|
+
70
|
405
|
+
71
|
406
|
+
72
|
407
|
+
73
|
408
|
+
74
|
409
|
+
75
|
410
|
+
76
|
411
|
+
77</pre>
|
412
|
+
</td>
|
413
|
+
<td>
|
414
|
+
<pre class="code"><span class="info file"># File 'lib/workosv2/sso.rb', line 62</span>
|
415
|
+
|
416
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_authorization_url'>authorization_url</span><span class='lparen'>(</span>
|
417
|
+
<span class='label'>client_id:</span><span class='comma'>,</span> <span class='label'>redirect_uri:</span><span class='comma'>,</span> <span class='label'>domain:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>provider:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>state:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
418
|
+
<span class='rparen'>)</span>
|
419
|
+
<span class='id identifier rubyid_validate_domain_and_provider'>validate_domain_and_provider</span><span class='lparen'>(</span><span class='label'>provider:</span> <span class='id identifier rubyid_provider'>provider</span><span class='comma'>,</span> <span class='label'>domain:</span> <span class='id identifier rubyid_domain'>domain</span><span class='rparen'>)</span>
|
420
|
+
|
421
|
+
<span class='id identifier rubyid_query'>query</span> <span class='op'>=</span> <span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode_www_form'>encode_www_form</span><span class='lparen'>(</span><span class='lbrace'>{</span>
|
422
|
+
<span class='label'>client_id:</span> <span class='id identifier rubyid_project_id'>client_id</span><span class='comma'>,</span>
|
423
|
+
<span class='label'>redirect_uri:</span> <span class='id identifier rubyid_redirect_uri'>redirect_uri</span><span class='comma'>,</span>
|
424
|
+
<span class='label'>response_type:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>code</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
425
|
+
<span class='label'>state:</span> <span class='id identifier rubyid_state'>state</span><span class='comma'>,</span>
|
426
|
+
<span class='label'>domain:</span> <span class='id identifier rubyid_domain'>domain</span><span class='comma'>,</span>
|
427
|
+
<span class='label'>provider:</span> <span class='id identifier rubyid_provider'>provider</span><span class='comma'>,</span>
|
428
|
+
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='rparen'>)</span>
|
429
|
+
|
430
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>https://</span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="../WorkOS.html" title="WorkOS (module)">WorkOS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../WorkOS.html#API_HOSTNAME-constant" title="WorkOS::API_HOSTNAME (constant)">API_HOSTNAME</a></span></span><span class='embexpr_end'>}</span><span class='tstring_content'>/sso/authorize?</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_query'>query</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
431
|
+
<span class='kw'>end</span></pre>
|
432
|
+
</td>
|
433
|
+
</tr>
|
434
|
+
</table>
|
435
|
+
</div>
|
436
|
+
|
437
|
+
<div class="method_details ">
|
438
|
+
<h3 class="signature " id="profile-class_method">
|
439
|
+
|
440
|
+
.<strong>profile</strong>(code:, client_id:) ⇒ <tt><span class='object_link'><a href="Profile.html" title="WorkOS::Profile (class)">WorkOS::Profile</a></span></tt>
|
441
|
+
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
</h3><div class="docstring">
|
447
|
+
<div class="discussion">
|
448
|
+
|
449
|
+
<p>Fetch the profile details for the authenticated SSO user.</p>
|
450
|
+
|
451
|
+
|
452
|
+
</div>
|
453
|
+
</div>
|
454
|
+
<div class="tags">
|
455
|
+
|
456
|
+
<div class="examples">
|
457
|
+
<p class="tag_title">Examples:</p>
|
458
|
+
|
459
|
+
|
460
|
+
<pre class="example code"><code>WorkOS::SSO.profile(
|
461
|
+
code: 'acme.com',
|
462
|
+
client_id: 'project_01DG5TGK363GRVXP3ZS40WNGEZ'
|
463
|
+
)
|
464
|
+
=> #<WorkOS::Profile:0x00007fb6e4193d20
|
465
|
+
@id="prof_01DRA1XNSJDZ19A31F183ECQW5",
|
466
|
+
@email="demo@workos-okta.com",
|
467
|
+
@first_name="WorkOS",
|
468
|
+
@connection_type="OktaSAML",
|
469
|
+
@last_name="Demo",
|
470
|
+
@idp_id="00u1klkowm8EGah2H357",
|
471
|
+
@access_token="01DVX6QBS3EG6FHY2ESAA5Q65X"
|
472
|
+
></code></pre>
|
473
|
+
|
474
|
+
</div>
|
475
|
+
<p class="tag_title">Parameters:</p>
|
476
|
+
<ul class="param">
|
477
|
+
|
478
|
+
<li>
|
479
|
+
|
480
|
+
<span class='name'>code</span>
|
481
|
+
|
482
|
+
|
483
|
+
<span class='type'>(<tt>String</tt>)</span>
|
484
|
+
|
485
|
+
|
486
|
+
|
487
|
+
—
|
488
|
+
<div class='inline'>
|
489
|
+
<p>The authorization code provided in the callback URL</p>
|
490
|
+
</div>
|
491
|
+
|
492
|
+
</li>
|
493
|
+
|
494
|
+
<li>
|
495
|
+
|
496
|
+
<span class='name'>client_id</span>
|
497
|
+
|
498
|
+
|
499
|
+
<span class='type'>(<tt>String</tt>)</span>
|
500
|
+
|
501
|
+
|
502
|
+
|
503
|
+
—
|
504
|
+
<div class='inline'>
|
505
|
+
<p>The WorkOS client ID for the environment where you've configured your SSO connection</p>
|
506
|
+
</div>
|
507
|
+
|
508
|
+
</li>
|
509
|
+
|
510
|
+
</ul>
|
511
|
+
|
512
|
+
<p class="tag_title">Returns:</p>
|
513
|
+
<ul class="return">
|
514
|
+
|
515
|
+
<li>
|
516
|
+
|
517
|
+
|
518
|
+
<span class='type'>(<tt><span class='object_link'><a href="Profile.html" title="WorkOS::Profile (class)">WorkOS::Profile</a></span></tt>)</span>
|
519
|
+
|
520
|
+
|
521
|
+
|
522
|
+
</li>
|
523
|
+
|
524
|
+
</ul>
|
525
|
+
|
526
|
+
</div><table class="source_code">
|
527
|
+
<tr>
|
528
|
+
<td>
|
529
|
+
<pre class="lines">
|
530
|
+
|
531
|
+
|
532
|
+
108
|
533
|
+
109
|
534
|
+
110
|
535
|
+
111
|
536
|
+
112
|
537
|
+
113
|
538
|
+
114
|
539
|
+
115
|
540
|
+
116
|
541
|
+
117
|
542
|
+
118
|
543
|
+
119
|
544
|
+
120</pre>
|
545
|
+
</td>
|
546
|
+
<td>
|
547
|
+
<pre class="code"><span class="info file"># File 'lib/workosv2/sso.rb', line 108</span>
|
548
|
+
|
549
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_profile'>profile</span><span class='lparen'>(</span><span class='label'>code:</span><span class='comma'>,</span> <span class='label'>client_id:</span><span class='rparen'>)</span>
|
550
|
+
<span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
551
|
+
<span class='label'>client_id:</span> <span class='id identifier rubyid_project_id'>client_id</span><span class='comma'>,</span>
|
552
|
+
<span class='label'>client_secret:</span> <span class='const'><span class='object_link'><a href="../WorkOS.html" title="WorkOS (module)">WorkOS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_key!'><span class='object_link'><a href="../WorkOS.html#key!-class_method" title="WorkOS.key! (method)">key!</a></span></span><span class='comma'>,</span>
|
553
|
+
<span class='label'>grant_type:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>authorization_code</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
554
|
+
<span class='label'>code:</span> <span class='id identifier rubyid_code'>code</span><span class='comma'>,</span>
|
555
|
+
<span class='rbrace'>}</span>
|
556
|
+
|
557
|
+
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='id identifier rubyid_post_request'>post_request</span><span class='lparen'>(</span><span class='label'>path:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/sso/token</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>body:</span> <span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
558
|
+
<span class='id identifier rubyid_check_and_raise_profile_error'>check_and_raise_profile_error</span><span class='lparen'>(</span><span class='label'>response:</span> <span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span>
|
559
|
+
|
560
|
+
<span class='const'><span class='object_link'><a href="../WorkOS.html" title="WorkOS (module)">WorkOS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Profile.html" title="WorkOS::Profile (class)">Profile</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Profile.html#initialize-instance_method" title="WorkOS::Profile#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
|
561
|
+
<span class='kw'>end</span></pre>
|
562
|
+
</td>
|
563
|
+
</tr>
|
564
|
+
</table>
|
565
|
+
</div>
|
566
|
+
|
567
|
+
<div class="method_details ">
|
568
|
+
<h3 class="signature " id="promote_draft_connection-class_method">
|
569
|
+
|
570
|
+
.<strong>promote_draft_connection</strong>(token:) ⇒ <tt>Bool</tt>
|
571
|
+
|
572
|
+
|
573
|
+
|
574
|
+
|
575
|
+
|
576
|
+
</h3><div class="docstring">
|
577
|
+
<div class="discussion">
|
578
|
+
|
579
|
+
<p>Promote a DraftConnection created via the WorkOS.js embed such that the Enterprise users can begin signing into your application.</p>
|
580
|
+
|
581
|
+
<p>you by the WorkOS.js embed</p>
|
582
|
+
|
583
|
+
|
584
|
+
</div>
|
585
|
+
</div>
|
586
|
+
<div class="tags">
|
587
|
+
|
588
|
+
<div class="examples">
|
589
|
+
<p class="tag_title">Examples:</p>
|
590
|
+
|
591
|
+
|
592
|
+
<pre class="example code"><code>WorkOS::SSO.promote_draft_connection(
|
593
|
+
token: 'draft_conn_429u59js',
|
594
|
+
)
|
595
|
+
=> true</code></pre>
|
596
|
+
|
597
|
+
</div>
|
598
|
+
<p class="tag_title">Parameters:</p>
|
599
|
+
<ul class="param">
|
600
|
+
|
601
|
+
<li>
|
602
|
+
|
603
|
+
<span class='name'>token</span>
|
604
|
+
|
605
|
+
|
606
|
+
<span class='type'>(<tt>String</tt>)</span>
|
607
|
+
|
608
|
+
|
609
|
+
|
610
|
+
—
|
611
|
+
<div class='inline'>
|
612
|
+
<p>The draft connection token that's been provided to</p>
|
613
|
+
</div>
|
614
|
+
|
615
|
+
</li>
|
616
|
+
|
617
|
+
</ul>
|
618
|
+
|
619
|
+
<p class="tag_title">Returns:</p>
|
620
|
+
<ul class="return">
|
621
|
+
|
622
|
+
<li>
|
623
|
+
|
624
|
+
|
625
|
+
<span class='type'>(<tt>Bool</tt>)</span>
|
626
|
+
|
627
|
+
|
628
|
+
|
629
|
+
—
|
630
|
+
<div class='inline'><ul><li>
|
631
|
+
<p>returns `true` if successful, `false` otherwise.</p>
|
632
|
+
</li></ul>
|
633
|
+
</div>
|
634
|
+
|
635
|
+
</li>
|
636
|
+
|
637
|
+
</ul>
|
638
|
+
|
639
|
+
<p class="tag_title">See Also:</p>
|
640
|
+
<ul class="see">
|
641
|
+
|
642
|
+
<li><a href="https://github.com/workos-inc/ruby-idp-link-example" target="_parent" title="https://github.com/workos-inc/ruby-idp-link-example">https://github.com/workos-inc/ruby-idp-link-example</a></li>
|
643
|
+
|
644
|
+
</ul>
|
645
|
+
|
646
|
+
</div><table class="source_code">
|
647
|
+
<tr>
|
648
|
+
<td>
|
649
|
+
<pre class="lines">
|
650
|
+
|
651
|
+
|
652
|
+
142
|
653
|
+
143
|
654
|
+
144
|
655
|
+
145
|
656
|
+
146
|
657
|
+
147
|
658
|
+
148
|
659
|
+
149
|
660
|
+
150</pre>
|
661
|
+
</td>
|
662
|
+
<td>
|
663
|
+
<pre class="code"><span class="info file"># File 'lib/workosv2/sso.rb', line 142</span>
|
664
|
+
|
665
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_promote_draft_connection'>promote_draft_connection</span><span class='lparen'>(</span><span class='label'>token:</span><span class='rparen'>)</span>
|
666
|
+
<span class='id identifier rubyid_request'>request</span> <span class='op'>=</span> <span class='id identifier rubyid_bearer_post_request'>bearer_post_request</span><span class='lparen'>(</span>
|
667
|
+
<span class='label'>path:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/draft_connections/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_token'>token</span><span class='embexpr_end'>}</span><span class='tstring_content'>/activate</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
668
|
+
<span class='rparen'>)</span>
|
669
|
+
|
670
|
+
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span>
|
671
|
+
|
672
|
+
<span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPSuccess</span>
|
673
|
+
<span class='kw'>end</span></pre>
|
674
|
+
</td>
|
675
|
+
</tr>
|
676
|
+
</table>
|
677
|
+
</div>
|
678
|
+
|
679
|
+
</div>
|
680
|
+
|
681
|
+
</div>
|
682
|
+
|
683
|
+
<div id="footer">
|
684
|
+
Generated on Tue Apr 7 22:21:07 2020 by
|
685
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
686
|
+
0.9.22 (ruby-2.7.1).
|
687
|
+
</div>
|
688
|
+
|
689
|
+
</div>
|
690
|
+
</body>
|
691
|
+
</html>
|