Skip to content

Commit

Permalink
Use proto-defined auth check struct
Browse files Browse the repository at this point in the history
  • Loading branch information
logan-stytch committed Dec 6, 2023
1 parent 03b6b52 commit dea0ed2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/stytch/b2b_sessions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ def get(
# delete a key, supply a null value. Custom claims made with reserved claims (`iss`, `sub`, `aud`, `exp`, `nbf`, `iat`, `jti`) will be ignored.
# Total custom claims size cannot exceed four kilobytes.
# The type of this field is nilable +object+.
# authorization_check::
# (no documentation yet)
# The type of this field is nilable +AuthorizationCheck+ (+object+).
#
# == Returns:
# An object with the following fields:
Expand Down Expand Up @@ -124,13 +127,15 @@ def authenticate(
session_token: nil,
session_duration_minutes: nil,
session_jwt: nil,
session_custom_claims: nil
session_custom_claims: nil,
authorization_check: nil
)
request = {}
request[:session_token] = session_token unless session_token.nil?
request[:session_duration_minutes] = session_duration_minutes unless session_duration_minutes.nil?
request[:session_jwt] = session_jwt unless session_jwt.nil?
request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
request[:authorization_check] = authorization_check unless authorization_check.nil?

post_request('/v1/b2b/sessions/authenticate', request)
end
Expand Down

0 comments on commit dea0ed2

Please sign in to comment.