warden.authenticate!(auth_options)
warden Authentifizierung zurückkehr 401
für diese params adaequat:
{ "UTF-8" => "✓" "authenticity_token" => "5BMAUoZLUEgPZBVOAcQ8lFD4 + pumP9kEvvXyelbnjeO36AZJQt2oRlraicQ6quvh/dccS0ELUkxjACgFcWFYAg ==", "user" => {"email" => "[email protected]", "passwort" => "xyz", "phone" => "9443429932"}, "action" => "create", " controller "=>" sessions ", " format "=>" json "," sitzung "=> {" user "=> {" email "=>" [email protected] ", " passwort "=>" xyz "," Telefon "=>" 944342993 2 "}}}
aber für diese Papiere nicht vorhanden:
{" UTF-8 "=>" ✓“, "authenticity_token"=> "/ ly2phwfsD3HEVkHK39ajYQGv6R4uj2z3B + 3eiZEU0qtp7C92IlIM5KvxY0QEY34KSlZdJ + OtvsB6m0FAcKGqw ==", "user" => {"phone" => "9443429932", "passwort" => "xyz", "email" => "[email protected]"}, "action" => "create", " controller "=>" sitzungen "," format "=>" json ", " sitzung "=> {" user "=> {" phone "=>" 9443429932 "," passwort "=>" xyz ", " email "=>" [email protected] "}}}
Die Daten sind in beiden Fällen bis auf die Reihenfolge identisch. Stuck damit lange.
hier ist das Protokoll:
Gestartet POST "https://stackoverflow.com/users/sign_in.json" für 127.0.0.1 bei 2017-04-10 10:53:07 +0530 Verarbeitung von SessionsController # erstellen, wie JSON
Parameter: { "UTF-8" => "✓", "authenticity_token" => "XVMbYLTgv4eFbv9pX5lJD3U6DHF17o18rVIjqQLo4skOqB17cHZHidDQY + Nk95562BXqoZLaBjRwp/nWJW43KA ==", "user" => { "phone" => "9443429932", "Passwort" = > "[FILTERED]"}, "Sitzung" => {"user" => {"phone" => "9443429932", "password" => "[GEFILTERT]"}}} User Load (0.3ms) WÄHLEN SIEusers
. * VONusers
WHEREusers
.id
= 12422916 AND (invitation_token ist null) LIMIT 1 Unerlaubte 401 in 15ms