Class: StytchB2B::Client
- Inherits:
-
Object
- Object
- StytchB2B::Client
- Defined in:
- lib/stytch/b2b_client.rb
Constant Summary collapse
- ENVIRONMENTS =
%i[live test].freeze
Instance Attribute Summary collapse
-
#discovery ⇒ Object
readonly
Returns the value of attribute discovery.
-
#m2m ⇒ Object
readonly
Returns the value of attribute m2m.
-
#magic_links ⇒ Object
readonly
Returns the value of attribute magic_links.
-
#oauth ⇒ Object
readonly
Returns the value of attribute oauth.
-
#organizations ⇒ Object
readonly
Returns the value of attribute organizations.
-
#otps ⇒ Object
readonly
Returns the value of attribute otps.
-
#passwords ⇒ Object
readonly
Returns the value of attribute passwords.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
-
#rbac ⇒ Object
readonly
Returns the value of attribute rbac.
-
#recovery_codes ⇒ Object
readonly
Returns the value of attribute recovery_codes.
-
#scim ⇒ Object
readonly
Returns the value of attribute scim.
-
#sessions ⇒ Object
readonly
Returns the value of attribute sessions.
-
#sso ⇒ Object
readonly
Returns the value of attribute sso.
-
#totps ⇒ Object
readonly
Returns the value of attribute totps.
Instance Method Summary collapse
-
#initialize(project_id:, secret:, env: nil, &block) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(project_id:, secret:, env: nil, &block) ⇒ Client
Returns a new instance of Client.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/stytch/b2b_client.rb', line 25 def initialize(project_id:, secret:, env: nil, &block) @api_host = api_host(env, project_id) @project_id = project_id @secret = secret create_connection(&block) rbac = StytchB2B::RBAC.new(@connection) @policy_cache = StytchB2B::PolicyCache.new(rbac_client: rbac) @discovery = StytchB2B::Discovery.new(@connection) @m2m = Stytch::M2M.new(@connection, @project_id) @magic_links = StytchB2B::MagicLinks.new(@connection) @oauth = StytchB2B::OAuth.new(@connection) @otps = StytchB2B::OTPs.new(@connection) @organizations = StytchB2B::Organizations.new(@connection) @passwords = StytchB2B::Passwords.new(@connection) @project = Stytch::Project.new(@connection) @rbac = StytchB2B::RBAC.new(@connection) @recovery_codes = StytchB2B::RecoveryCodes.new(@connection) @scim = StytchB2B::SCIM.new(@connection) @sso = StytchB2B::SSO.new(@connection) @sessions = StytchB2B::Sessions.new(@connection, @project_id, @policy_cache) @totps = StytchB2B::TOTPs.new(@connection) end |
Instance Attribute Details
#discovery ⇒ Object (readonly)
Returns the value of attribute discovery.
23 24 25 |
# File 'lib/stytch/b2b_client.rb', line 23 def discovery @discovery end |
#m2m ⇒ Object (readonly)
Returns the value of attribute m2m.
23 24 25 |
# File 'lib/stytch/b2b_client.rb', line 23 def m2m @m2m end |
#magic_links ⇒ Object (readonly)
Returns the value of attribute magic_links.
23 24 25 |
# File 'lib/stytch/b2b_client.rb', line 23 def magic_links @magic_links end |
#oauth ⇒ Object (readonly)
Returns the value of attribute oauth.
23 24 25 |
# File 'lib/stytch/b2b_client.rb', line 23 def oauth @oauth end |
#organizations ⇒ Object (readonly)
Returns the value of attribute organizations.
23 24 25 |
# File 'lib/stytch/b2b_client.rb', line 23 def organizations @organizations end |
#otps ⇒ Object (readonly)
Returns the value of attribute otps.
23 24 25 |
# File 'lib/stytch/b2b_client.rb', line 23 def otps @otps end |
#passwords ⇒ Object (readonly)
Returns the value of attribute passwords.
23 24 25 |
# File 'lib/stytch/b2b_client.rb', line 23 def passwords @passwords end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
23 24 25 |
# File 'lib/stytch/b2b_client.rb', line 23 def project @project end |
#rbac ⇒ Object (readonly)
Returns the value of attribute rbac.
23 24 25 |
# File 'lib/stytch/b2b_client.rb', line 23 def rbac @rbac end |
#recovery_codes ⇒ Object (readonly)
Returns the value of attribute recovery_codes.
23 24 25 |
# File 'lib/stytch/b2b_client.rb', line 23 def recovery_codes @recovery_codes end |
#scim ⇒ Object (readonly)
Returns the value of attribute scim.
23 24 25 |
# File 'lib/stytch/b2b_client.rb', line 23 def scim @scim end |
#sessions ⇒ Object (readonly)
Returns the value of attribute sessions.
23 24 25 |
# File 'lib/stytch/b2b_client.rb', line 23 def sessions @sessions end |
#sso ⇒ Object (readonly)
Returns the value of attribute sso.
23 24 25 |
# File 'lib/stytch/b2b_client.rb', line 23 def sso @sso end |
#totps ⇒ Object (readonly)
Returns the value of attribute totps.
23 24 25 |
# File 'lib/stytch/b2b_client.rb', line 23 def totps @totps end |