mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 02:11:08 -06:00
23e5c605f6
Initially, this feature is only intended for use in core/plugins, so there is no API for requesting a parameter-scoped key. That may change in future.
18 lines
487 B
Ruby
18 lines
487 B
Ruby
# frozen_string_literal: true
|
|
|
|
Fabricator(:user_api_key_scope)
|
|
|
|
Fabricator(:readonly_user_api_key, from: :user_api_key) do
|
|
user
|
|
scopes { [Fabricate.build(:user_api_key_scope, name: 'read')] }
|
|
client_id { SecureRandom.hex }
|
|
application_name 'some app'
|
|
end
|
|
|
|
Fabricator(:bookmarks_calendar_user_api_key, from: :user_api_key) do
|
|
user
|
|
scopes { [Fabricate.build(:user_api_key_scope, name: 'bookmarks_calendar')] }
|
|
client_id { SecureRandom.hex }
|
|
application_name 'some app'
|
|
end
|