Persona is no longer supported by Mozilla, so let's remove it.
BPT4WJ7UWVRNXFO2GD2I2P5Z5PHKZDRVIOAAUW23JI5H4GCHLGSAC
XHOZT4WTBN3Y7Q2MBANFS65X4HYL6SGPA7JNB7T7OD726SU2ACWAC
JATZRMWWP6ENJRULJ2PFW6NT35C4N3WVWACAFFNI5DKF2H6AY7FAC
BKMQXGBOQIANQGBI3JMMVE3CA32SJF2MI4XMXAJA3EWZ2MYPZDTQC
UAPS46BQNEZACYO2LYXEXIK5YESDG2N2B3BYIZGVETGP6LOM4OGAC
2DHE2ZAKR4AU7OE6E5CYNFWVGQXLHEX5LFKVU43PMBVX3QW6RHFAC
J5UVLXOK6EDIL5I7VKWH4V2QDS4DPD7FHRK6XBWSXFRQS4JKXFZQC
3QWDDLBR5DGFK5Y3TDMK55R2SCHRHFVO2KW2BMZGIYRTIQEZC45AC
HL6ZYWHFSOSTGCUEP2K554F5OY4RWAHJYS2MA2V3JMZIG262LFKAC
XJRJ4J7M6BC433TBLWHHKX7UYYCFX6M7ZQLUEYYTREPCSM6M3RDQC
36ZTCZ4FDV6ILURQEIGFHCP57ALZH6OWYNN3MBXG2QXZSBULBPMAC
JARRBLZDQ2JZWY7IUVPTOT7WJMBPMLFLF2MGLVGOYROAAISYGLSAC
QL55ECJ6KMMBUOWQ6LKSOVN7L43CH4S6SPE2AQ3VX3KSGC32RP4AC
D44B24QC6NCED6DVUYP2IJJEVBG2JNBKPBRRSLI5UXQTKA23DJQQC
N22GPKYTOLZLBGTGDATQDVZ4R5APZEAOIA7L32X4UXBH4XNI7MWAC
sub persona_login :Path('/persona-login') Args(0) {
my ($self, $c) = @_;
requirePost($c);
error($c, "Logging in via Persona is not enabled.") unless $c->config->{enable_persona};
my $assertion = $c->stash->{params}->{assertion} or die;
my $ua = new LWP::UserAgent;
my $response = $ua->post(
'https://verifier.login.persona.org/verify',
{ assertion => $assertion,
audience => $c->uri_for('/')
});
error($c, "Did not get a response from Persona.") unless $response->is_success;
my $d = decode_json($response->decoded_content) or die;
error($c, "Persona says: $d->{reason}") if $d->{status} ne "okay";
doEmailLogin($self, $c, "persona", $d->{email}, undef);
}
});
</script>
[% END %]
[% IF c.config.enable_persona %]
<script>
$("#persona-signin").click(function() {
navigator.id.watch({
onlogin: function(assertion) {
requestJSON({
url: "[% c.uri_for('/persona-login') %]",
data: "assertion=" + assertion,
type: 'POST',
success: function(data) { window.location.reload(); },
postError: function() { navigator.id.logout(); }
});
}
});
navigator.id.request({ siteName: 'Hydra' });