main
1# frozen_string_literal: true
2
3class MetadataController < ApplicationController
4 skip_before_action :authenticate!
5
6 def show
7 render xml: to_xml, content_type: "application/samlmetadata+xml"
8 end
9
10 private
11
12 def to_xml
13 Rails.cache.fetch(metadata_url, expires_in: 1.hour) do
14 Idp.default(request).to_xml
15 end
16 end
17end