2022-03-28 19:50:36 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
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-03-22 16:40:09 +01: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
|
|
|
end
|
2022-03-22 16:40:09 +01:00
|
|
|
end
|
2022-03-30 11:31:05 +02:00
|
|
|
|
|
|
|
if @provider.providable_type == OpenIdConnectProvider.name
|
|
|
|
json.providable_attributes do
|
2022-04-19 17:39:42 +02:00
|
|
|
json.extract! @provider.providable, :id, :issuer, :discovery, :client_auth_method, :scope,
|
2022-04-20 14:12:22 +02:00
|
|
|
:prompt, :send_scope_to_token_endpoint, :client__identifier, :client__secret, :client__authorization_endpoint,
|
2022-04-19 16:55:46 +02:00
|
|
|
:client__token_endpoint, :client__userinfo_endpoint, :client__jwks_uri, :client__end_session_endpoint, :profile_url
|
2022-03-30 11:31:05 +02:00
|
|
|
end
|
|
|
|
end
|
2022-04-01 17:48:32 +02:00
|
|
|
|