Module: WorkOS

Defined in:
lib/workos.rb,
lib/workos/sso.rb,
lib/workos/base.rb,
lib/workos/types.rb,
lib/workos/profile.rb,
lib/workos/version.rb,
lib/workos/request_error.rb,
lib/workos/types/profile_struct.rb

Overview

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.

Defined Under Namespace

Modules: SSO, Types Classes: Base, Profile, RequestError

Constant Summary collapse

API_HOSTNAME =
'api.workos.com'
VERSION =
'0.0.2'

Class Method Summary collapse

Class Method Details

.keyObject



21
22
23
# File 'lib/workos.rb', line 21

def self.key
  Base.key
end

.key!Object



25
26
27
# File 'lib/workos.rb', line 25

def self.key!
  key || raise('WorkOS.key not set')
end

.key=(value) ⇒ Object



17
18
19
# File 'lib/workos.rb', line 17

def self.key=(value)
  Base.key = value
end