Skip to content
Extraits de code Groupes Projets
Valider 054e4218 rédigé par theworldbright's avatar theworldbright
Parcourir les fichiers

Remove zone info claim

parent 724f3260
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -26,7 +26,7 @@ module Api ...@@ -26,7 +26,7 @@ module Api
subject_types_supported: %w(public pairwise), subject_types_supported: %w(public pairwise),
id_token_signing_alg_values_supported: %i(RS256), id_token_signing_alg_values_supported: %i(RS256),
token_endpoint_auth_methods_supported: %w(client_secret_basic client_secret_post), token_endpoint_auth_methods_supported: %w(client_secret_basic client_secret_post),
claims_supported: %w(sub nickname profile picture zoneinfo) claims_supported: %w(sub nickname profile picture)
) )
end end
end end
......
class UserInfoSerializer < ActiveModel::Serializer class UserInfoSerializer < ActiveModel::Serializer
attributes :sub, :nickname, :profile, :picture, :zoneinfo attributes :sub, :nickname, :profile, :picture
def sub def sub
auth = serialization_options[:authorization] auth = serialization_options[:authorization]
...@@ -24,8 +24,4 @@ class UserInfoSerializer < ActiveModel::Serializer ...@@ -24,8 +24,4 @@ class UserInfoSerializer < ActiveModel::Serializer
def picture def picture
File.join(AppConfig.environment.url, object.image_url).to_s File.join(AppConfig.environment.url, object.image_url).to_s
end end
def zoneinfo
object.language
end
end end
...@@ -32,7 +32,6 @@ Then /^I should receive "([^\"]*)"'s id, username, and email$/ do |username| ...@@ -32,7 +32,6 @@ Then /^I should receive "([^\"]*)"'s id, username, and email$/ do |username|
user = User.find_by_username(username) user = User.find_by_username(username)
user_profile_url = File.join(AppConfig.environment.url, "people", user.guid).to_s user_profile_url = File.join(AppConfig.environment.url, "people", user.guid).to_s
expect(user_info_json["profile"]).to have_content(user_profile_url) expect(user_info_json["profile"]).to have_content(user_profile_url)
expect(user_info_json["zoneinfo"]).to have_content(user.language)
end end
Then /^I should receive an "([^\"]*)" error$/ do |error_message| Then /^I should receive an "([^\"]*)" error$/ do |error_message|
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter