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.
77 78 79 80 81 82 83 |
# File 'lib/tiktok/open/sdk/config.rb', line 77 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.
58 59 60 |
# File 'lib/tiktok/open/sdk/config.rb', line 58 def auth_url @auth_url end |
#redirect_uri ⇒ String?
Returns OAuth redirect URI.
74 75 76 |
# File 'lib/tiktok/open/sdk/config.rb', line 74 def redirect_uri @redirect_uri end |
#revoke_token_url ⇒ String
Returns OAuth token revocation URL.
62 63 64 |
# File 'lib/tiktok/open/sdk/config.rb', line 62 def revoke_token_url @revoke_token_url end |
#scopes ⇒ Array<String>
Returns List of OAuth scopes.
70 71 72 |
# File 'lib/tiktok/open/sdk/config.rb', line 70 def scopes @scopes end |
#token_url ⇒ String
Returns OAuth token exchange URL.
66 67 68 |
# File 'lib/tiktok/open/sdk/config.rb', line 66 def token_url @token_url end |