草庐IT

auth_bug

全部标签

php - laravel 5.3 新的 Auth::routes()

最近开始用laravel5.3写博客,但是运行后有个问题phpartisanmake:auth当我运行它时,它会在我的web.php中生成路由这是其中的代码:Auth::routes();Route::get('/home','HomeController@index');然后我运行phpartisanroute:list,我发现很多Action,比如LoginController@login...但是我的App\Http\Controllers\Auth中没有找到这些Action,这些在哪里?还有Auth::routes()代表什么,我找不到关于Auth的路由。我需要帮助,谢谢你回答

mongodb - 无法验证到 mongo, "auth fails"

我使用以下说明为mongo创建了一个管理员用户:http://docs.mongodb.org/manual/tutorial/add-user-administrator/从mongo客户端看来我可以进行身份​​验证:>useadminswitchedtodbadmin>db.auth('admin','SECRETPASSWORD');1>但我无法以任何其他方式连接。例如:mongo-uadmin-pSECRETPASSWORD给出错误:JavaScriptexecutionfailed:Error:18{code:18,ok:0.0,errmsg:"authfails"}atsr

ios - Swift 3 URLSession.shared() 对成员 'dataTask(with :completionHandler:) error (bug)) 的模糊引用

您好,我有用于swift2.2的json解析代码,但是当我将它用于Swift3.0时,出现了该错误ViewController.swift:132:31:Ambiguousreferencetomember'dataTask(with:completionHandler:)'我的代码在这里letlistUrlString="http://bla.com?batchSize="+String(batchSize)+"&fromIndex="+String(fromIndex)letmyUrl=URL(string:listUrlString);letrequest=NSMutableUR

ruby-on-rails - auth-hmac功能测试问题

我想在我的api应用程序中使用这个gemhttps://github.com/seangeo/auth-hmac/我有一个关于为请求认证创建测试的问题。我想用hmac签署请求,但railsController在下一个代码后没有httpheaderdefsetup#loadfromfixture@client=clients(:client_2)enddefsign_valid_request(request,client)auth_hmac=AuthHMAC.new(client.key=>client.secret)auth_hmac.sign!(request,client.key

ruby - 这看起来像 ruby​​ Time equality bug 吗?

为什么第二次比较中的false?我没有加载任何库。putsRUBY_DESCRIPTIONt=Time.nowt1=Time.at(t.to_f)t2=Time.at(t.to_f)puts(t1==t2)puts(t==t1)puts(t.to_f==t1.to_f)printf"%.64f\n%.64f\n%.64f\n",t,t1,t2输出:ruby1.9.3p194(2012-04-20revision35410)[x86_64-darwin11.4.0]truefalsetrue1347661545.43484401702880859375000000000000000000

ruby-on-rails - Devise_token_auth 和 Devise 使用用户名和电子邮件登录

在尝试向我现有的Rails应用程序添加token身份验证时,我不断遇到错误,它源于设计authentication_keys。在我的Rails4应用程序中,我允许用户使用用户名或电子邮件登录,我想为API提供相同的功能。我从API登录时得到的错误如下StartedPOST"/api/v1/auth/sign_in"for127.0.0.1at2016-04-1923:40:26-0400ProcessingbyDeviseTokenAuth::SessionsController#createasJSONParameters:{"login"=>"email@example.com",

ruby-on-rails - 在 rails link_to 路径中设置 auth header

我必须向请求添加授权header。我尝试添加::headers=>$auth_headers在方法中:link_to("Verify",agency_verify_path(agency),:method=>:put,:headers=>$auth_headers)但token认证失败。 最佳答案 您不能在link_to中设置header。创建一个Controller操作来设置正确的header并将用户重定向到您的目的地。此外,更喜欢auth_headers或@auth_headers而不是$auth_headers。

ruby-on-rails - 使用适用于 Ruby 的 Google Auth 库登录用户

我想用google-auth-library-ruby登录用户gem。在他们的指南“服务器端应用程序的Google登录”中,他们有agoodcodeexample如何交换IDtoken的授权代码,但它仅适用于Python(和Java):credentials=client.credentials_from_clientsecrets_and_code(CLIENT_SECRET_FILE,['https://www.googleapis.com/auth/drive.appdata','profile','email'],auth_code)有人知道Ruby的等价物吗?附言。我熟悉om

ruby-on-rails - sqlite3_native.so : [BUG] Segmentation fault

我遇到了这个sqlite3问题,不知道为什么;我浏览了这个论坛很多小时,但找不到类似的问题。我正在使用ruby​​1.9.3,但错误消息似乎调用了ruby​​1.8.7;我什至卸载了ruby​​1.8.7,然后卸载了sqlite3,然后重新安装了它,但这并没有解决问题我正在运行rails3.2.8user1@company.com[~/rails_apps/myapp]#rails-vRails3.2.8和ruby1.9.3user1@company.com[~/rails_apps/myapp]#ruby-vruby1.9.3p286(2012-10-12revision37165)

ruby-on-rails - Rails devise_token_auth gem,如何设置密码重置链接?

我在使用此gem的密码重置功能时遇到问题。https://github.com/lynndylanhurley/devise_token_auth这是来自文档。/password/editGET"Verifyuserbypasswordresettoken.ThisrouteisthedestinationURLforpasswordresetconfirmation.Thisroutemustcontainreset_password_tokenandredirect_urlparams.Thesevalueswillbesetautomaticallybytheconfirmati