2016-03-23 18:39:41 +01:00
|
|
|
json.partial! 'api/auth_providers/auth_provider', auth_provider: @provider
|
|
|
|
|
|
|
|
# OAuth 2.0
|
|
|
|
|
|
|
|
if @provider.providable_type == OAuth2Provider.name
|
|
|
|
json.providable_attributes do
|
2022-04-01 17:48:32 +02:00
|
|
|
json.extract! @provider.providable, :id, :base_url, :token_endpoint, :authorization_endpoint, :profile_url, :client_id, :client_secret, :scopes
|
2016-03-23 18:39:41 +01:00
|
|
|
json.o_auth2_mappings_attributes @provider.providable.o_auth2_mappings do |m|
|
2016-09-15 15:58:21 +02:00
|
|
|
json.extract! m, :id, :local_model, :local_field, :api_field, :api_endpoint, :api_data_type, :transformation
|
2016-03-23 18:39:41 +01:00
|
|
|
end
|
|
|
|
end
|
2022-04-01 17:48:32 +02:00
|
|
|
end
|