ce );
use Plack::Response;
use Plack::Session;
use LWP::Protocol::https;
use LWP::UserAgent;
use JSON;
sub prepare_app {
my $self = shift;
$self->audience or croak 'audience is not set';
}
>method eq 'POST' ) {
my $uri = 'https://verifier.login.persona.org/verify';
my $json = {
assertion => $req->body_parameters->{'assertion'},
audience => $self
T', $uri );
$persona_req->header( 'Content-Type' => 'application/json' );
$persona_req->content( to_json( $json, { utf8 => 1 } ) );
my $ua = LWP::UserAgent->new( ssl_opts => {