Slight cleanup in the Persona sign in code

[?]
Nov 5, 2013, 1:10 PM
P75LFRF4GMC5KSIHC4XDBFRYIO36XUABQ2BN3EJXL42764BFAZUAC

Dependencies

  • [2] PFB5ZUQW Fix legacy login
  • [3] XMB4MTRL Show sign in as success
  • [4] 36ZTCZ4F Add basic Persona support
  • [5] 2CZSW5S5 Don't redirect to /login if authentication is required
  • [6] LZVO64YG Merge in the first bits of the API work
  • [7] XUKHBDR5 Prevent Persona users from setting a password
  • [8] D44B24QC Store the account type ("hydra" or "persona") explicitly in the database
  • [*] XJRJ4J7M Add user registration
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.

Change contents

  • edit in src/lib/Hydra/Controller/User.pm at line 49
    [3.112][3.112:140]()
    $c->stash->{json} = {};
  • replacement in src/lib/Hydra/Controller/User.pm at line 80
    [3.1073][3.1073:1113]()
    $c->stash->{json}->{result} = "ok";
    [3.1073]
    [2.117]
    $self->status_no_content($c);
  • replacement in src/root/layout.tt at line 127
    [2.868][2.868:1243]()
    $.post("[% c.uri_for('/persona-login') %]", { assertion: assertion })
    .done(function(data) {
    if (data.error)
    bootbox.alert("Login failed: " + data.error);
    else
    window.location.reload();
    })
    .fail(function() { bootbox.alert("Server request failed!"); });
    [2.868]
    [2.1243]
    requestJSON({
    url: "[% c.uri_for('/persona-login') %]",
    data: "assertion=" + assertion,
    type: 'POST',
    success: function(data) { window.location.reload(); }
    });