Only allow primary domain for RS

Replace user addresses with usernames in the respective URLs
This commit is contained in:
Râu Cao
2023-11-01 21:46:38 +01:00
parent 5075fef616
commit 56c127ca0c
7 changed files with 65 additions and 43 deletions

View File

@@ -15,10 +15,10 @@ RSpec.describe "WebFinger", type: :request do
res = JSON.parse(response.body)
rs_link = res["links"].find {|l| l["rel"] == "http://tools.ietf.org/id/draft-dejong-remotestorage"}
expect(rs_link["href"]).to eql("https://storage.kosmos.org/tony@kosmos.org")
expect(rs_link["href"]).to eql("https://storage.kosmos.org/tony")
oauth_url = rs_link["properties"]["http://tools.ietf.org/html/rfc6749#section-4.2"]
expect(oauth_url).to eql("https://example.com/rs/oauth")
expect(oauth_url).to eql("http://www.example.com/rs/oauth/tony@kosmos.org")
end
end