Add WKD policy endpoint
This commit is contained in:
parent
534e5a9d3c
commit
729e4fd566
@ -28,4 +28,8 @@ class WebKeyDirectoryController < WellKnownController
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def policy
|
||||
head :ok
|
||||
end
|
||||
end
|
||||
|
@ -73,6 +73,7 @@ Rails.application.routes.draw do
|
||||
get '.well-known/lnurlp/:username', to: 'lnurlpay#index', as: :lightning_address
|
||||
get '.well-known/keysend/:username', to: 'lnurlpay#keysend', as: :lightning_address_keysend
|
||||
get '.well-known/openpgpkey/hu/:hashed_username(.:format)', to: 'web_key_directory#show', as: :wkd_key
|
||||
get '.well-known/openpgpkey/policy', to: 'web_key_directory#policy'
|
||||
|
||||
get 'lnurlpay/:username/invoice', to: 'lnurlpay#invoice', as: :lnurlpay_invoice
|
||||
|
||||
|
@ -1,6 +1,14 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe "OpenPGP Web Key Directory", type: :request do
|
||||
describe "policy" do
|
||||
it "returns an empty 200 response" do
|
||||
get "/.well-known/openpgpkey/policy"
|
||||
expect(response).to have_http_status(:ok)
|
||||
expect(response.body).to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
describe "non-existent user" do
|
||||
it "returns a 404 status" do
|
||||
get "/.well-known/openpgpkey/hu/fmb8gw3n4zdj4xpwaziki4mwcxr1368i?l=aristotle"
|
||||
|
Loading…
x
Reference in New Issue
Block a user