Sha256: 26ce5766702279bea5eae6c3b3cea1286e157a373ff5aa9ac937f3e1d1dceb7a
Contents?: true
Size: 761 Bytes
Versions: 7
Compression:
Stored size: 761 Bytes
Contents
# frozen_string_literal: true require_relative 'request_helper' module Stytch class OAuth include Stytch::RequestHelper PATH = '/v1/oauth' def initialize(connection) @connection = connection end def authenticate( token:, session_management_type: nil, session_token: nil, session_duration_minutes: nil ) request = { token: token } request[:session_management_type] = session_management_type unless session_management_type.nil? request[:session_token] = session_token unless session_token.nil? request[:session_duration_minutes] = session_duration_minutes unless session_duration_minutes.nil? post_request("#{PATH}/authenticate", request) end end end
Version data entries
7 entries across 7 versions & 1 rubygems