Class: Tiktok::Open::Sdk::Config::UserAuth
- Inherits:
-
Object
- Object
- Tiktok::Open::Sdk::Config::UserAuth
- Defined in:
- lib/tiktok/open/sdk/config.rb
Overview
User authentication configuration for TikTok Open SDK.
Holds OAuth URLs, scopes, and redirect URI.
Instance Attribute Summary collapse
-
#auth_url ⇒ String
OAuth authorization URL.
-
#redirect_uri ⇒ String?
OAuth redirect URI.
-
#revoke_token_url ⇒ String
OAuth token revocation URL.
-
#scopes ⇒ Array<String>
List of OAuth scopes.
-
#token_url ⇒ String
OAuth token exchange URL.
Instance Method Summary collapse
-
#initialize ⇒ UserAuth
constructor
Initializes a new UserAuth object with default URLs and empty scopes.
Constructor Details
#initialize ⇒ UserAuth
Initializes a new UserAuth object with default URLs and empty scopes.
82 83 84 85 86 87 88 |
# File 'lib/tiktok/open/sdk/config.rb', line 82 def initialize @auth_url = "#{AUTH_BASE_URL}/v2/auth/authorize/" @revoke_token_url = "#{OPEN_API_BASE_URL}/v2/oauth/revoke/" @token_url = "#{OPEN_API_BASE_URL}/v2/oauth/token/" @scopes = [] @redirect_uri = nil end |
Instance Attribute Details
#auth_url ⇒ String
Returns OAuth authorization URL.
63 64 65 |
# File 'lib/tiktok/open/sdk/config.rb', line 63 def auth_url @auth_url end |
#redirect_uri ⇒ String?
Returns OAuth redirect URI.
79 80 81 |
# File 'lib/tiktok/open/sdk/config.rb', line 79 def redirect_uri @redirect_uri end |
#revoke_token_url ⇒ String
Returns OAuth token revocation URL.
67 68 69 |
# File 'lib/tiktok/open/sdk/config.rb', line 67 def revoke_token_url @revoke_token_url end |
#scopes ⇒ Array<String>
Returns List of OAuth scopes.
75 76 77 |
# File 'lib/tiktok/open/sdk/config.rb', line 75 def scopes @scopes end |
#token_url ⇒ String
Returns OAuth token exchange URL.
71 72 73 |
# File 'lib/tiktok/open/sdk/config.rb', line 71 def token_url @token_url end |