Module: WorkOS

Defined in:
lib/workos.rb,
lib/workos/sso.rb,
lib/workos/base.rb,
lib/workos/types.rb,
lib/workos/client.rb,
lib/workos/errors.rb,
lib/workos/profile.rb,
lib/workos/version.rb,
lib/workos/audit_trail.rb,
lib/workos/types/provider_enum.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_API_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: AuditTrail, Base, Client, SSO, Types Classes: APIError, AuthenticationError, InvalidRequestError, Profile, WorkOSError

Constant Summary collapse

API_HOSTNAME =
ENV['WORKOS_API_HOSTNAME'] || 'api.workos.com'
VERSION =
'0.2.1'

Class Method Summary collapse

Class Method Details

.keyObject



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

def self.key
  Base.key
end

.key!Object



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

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

.key=(value) ⇒ Object



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

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