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

Fix webfinger discovery route

parent ab656179
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -5,7 +5,7 @@ module Api
jrd = {
links: [{
rel: OpenIDConnect::Discovery::Provider::Issuer::REL_VALUE,
href: File.join(root_url, "api", "openid_connect")
href: root_url
}]
}
jrd[:subject] = params[:resource] if params[:resource].present?
......
......@@ -247,13 +247,13 @@ Diaspora::Application.routes.draw do
resources :authorizations, only: %i(new create destroy)
post "authorizations/new", to: "authorizations#new"
get ".well-known/webfinger", to: "discovery#webfinger"
get ".well-known/openid-configuration", to: "discovery#configuration"
get "jwks.json", to: "id_tokens#jwks"
get "user_info", to: "user_info#show"
end
end
get ".well-known/webfinger", to: "api/openid_connect/discovery#webfinger"
get ".well-known/openid-configuration", to: "api/openid_connect/discovery#configuration"
get "user_applications", to: "user_applications#index"
end
......@@ -8,7 +8,7 @@ describe Api::OpenidConnect::DiscoveryController, type: :controller do
it "should return a url to the openid-configuration" do
json_body = JSON.parse(response.body)
expect(json_body["links"].first["href"]).to eq("http://test.host/api/openid_connect")
expect(json_body["links"].first["href"]).to eq("http://test.host/")
end
it "should return the resource in the subject" do
......
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