All URIs are relative to http://localhost:8090
Method | HTTP request | Description |
---|---|---|
callback | GET /api/auth/callback | OpenID Connect callback |
get_me | GET /api/auth/me | Get Me |
login | GET /api/auth | Login |
logout | DELETE /api/auth | Logout |
callback
OpenID Connect callback
OpenID Connect callback This is the callback route for the OAuth provider, it should not be called directly. Redirects to browser with set-cookie header.
require 'time'
require 'trieve_ruby_client'
api_instance = TrieveRubyClient::AuthApi.new
begin
# OpenID Connect callback
result = api_instance.callback
p result
rescue TrieveRubyClient::ApiError => e
puts "Error when calling AuthApi->callback: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> callback_with_http_info
begin
# OpenID Connect callback
data, status_code, headers = api_instance.callback_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => <SlimUser>
rescue TrieveRubyClient::ApiError => e
puts "Error when calling AuthApi->callback_with_http_info: #{e}"
end
This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
get_me
Get Me
Get Me Get the user corresponding to your current auth credentials.
require 'time'
require 'trieve_ruby_client'
# setup authorization
TrieveRubyClient.configure do |config|
# Configure API key authorization: ApiKey
config.api_key['ApiKey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['ApiKey'] = 'Bearer'
end
api_instance = TrieveRubyClient::AuthApi.new
begin
# Get Me
result = api_instance.get_me
p result
rescue TrieveRubyClient::ApiError => e
puts "Error when calling AuthApi->get_me: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_me_with_http_info
begin
# Get Me
data, status_code, headers = api_instance.get_me_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => <SlimUser>
rescue TrieveRubyClient::ApiError => e
puts "Error when calling AuthApi->get_me_with_http_info: #{e}"
end
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
login(content)
Login
Login This will redirect you to the OAuth provider for authentication with email/pass, SSO, Google, Github, etc.
require 'time'
require 'trieve_ruby_client'
api_instance = TrieveRubyClient::AuthApi.new
content = TrieveRubyClient::AuthQuery.new # AuthQuery | Query parameters for login to be included as kv pairs after ? on the request URL.
begin
# Login
api_instance.login(content)
rescue TrieveRubyClient::ApiError => e
puts "Error when calling AuthApi->login: #{e}"
end
This returns an Array which contains the response data (nil
in this case), status code and headers.
<Array(nil, Integer, Hash)> login_with_http_info(content)
begin
# Login
data, status_code, headers = api_instance.login_with_http_info(content)
p status_code # => 2xx
p headers # => { ... }
p data # => nil
rescue TrieveRubyClient::ApiError => e
puts "Error when calling AuthApi->login_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
content | AuthQuery | Query parameters for login to be included as kv pairs after ? on the request URL. |
nil (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
logout
Logout
Logout Invalidate your current auth credential stored typically stored in a cookie. This does not invalidate your API key.
require 'time'
require 'trieve_ruby_client'
api_instance = TrieveRubyClient::AuthApi.new
begin
# Logout
api_instance.logout
rescue TrieveRubyClient::ApiError => e
puts "Error when calling AuthApi->logout: #{e}"
end
This returns an Array which contains the response data (nil
in this case), status code and headers.
<Array(nil, Integer, Hash)> logout_with_http_info
begin
# Logout
data, status_code, headers = api_instance.logout_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => nil
rescue TrieveRubyClient::ApiError => e
puts "Error when calling AuthApi->logout_with_http_info: #{e}"
end
This endpoint does not need any parameter.
nil (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined