customized field headers
[sgn.git] / lib / SGN / Controller / OpenidConfiguration.pm
blob881cacd1188c3c571fa1cbbe19f6af6fa0d50018
2 package SGN::Controller::OpenidConfiguration;
4 use File::Slurp;
5 use Moose;
7 BEGIN { extends "Catalyst::Controller"; }
11 sub openid_configuration : Path('/.well-known/openid-configuration') Args(0) {
12 my $self = shift;
13 my $c = shift;
15 my $json = read_file($c->get_conf('basepath') . '/static/documents/openid-configuration.json');
16 my $site = $c->config->{main_production_site_url};
17 $json =~ s/\<\% \$site \%>/$site/;
18 $c->res->content_type("application/json");
19 $c->res->body($json);