草庐IT

local_auth

全部标签

php - Magento 自定义布局 local.xml 不适用于自定义模块输出页面

我正在同时开发一个Magento自定义模块和一个Magento自定义主题,但我遇到了一些让我发疯的问题!!!(附注:Magento1.7.0.2)我的模块和主题结构如下:app-local-MyNameSpace-MyPackageName-Block-controllers-etc-Helper-Model-sqldesign-frontend-default-myCustomTheme-etc-layout-template我的config.xml(放在MyPackageName/etc上):0.1.0standardNamespace_PackageNamepackagename

php - 在 header php 中使用 x-auth-token 发送请求

如何在YII中使用header将“x-auth-token”参数发送到服务器。我有这个代码$data=array('customerId'=>$userId);$getdata=http_build_query($data);$options=array('http'=>array('method'=>'GET','header'=>"Content-type:application/x-www-form-urlencoded\r\n"."Authorization:x-auth-token".$token."\r\n",'content'=>$getdata));$context=s

php - Laravel Passport "auth:api"中间件充当 "web, auth"中间件

我已经按照官方文档(https://laravel.com/docs/5.3/passport#introduction)中的描述为Laravel5.3设置了LaravelPassport包。我希望移动应用程序使用该API,因此我尝试实现密码授予token。我已经创建了一个密码授予客户端,并且token请求过程...$response=$http->post('http://my-app.com/oauth/token',['form_params'=>['grant_type'=>'password','client_id'=>'client-id','client_secret'=

php - Kohana 3 auth 模块,如何配置用户表和字段

我在模块加载器中取消注释以加载auth,但我不明白的是如何告诉auth模块它应该使用哪个表的哪些字段来进行身份验证?我也没有在Kohana3的用户指南中找到它,因为我发现auth模块的用户指南不存在。所以请告诉是否有人已经在使用它。如果它使用某些表的一些默认字段,那么我该如何修改它?感谢您阅读我的问题并努力回答。 最佳答案 这是适合你的步骤取消注释bootstrap.php中的Auth模块(您已经完成了)在ORMModule中,是的,在ORMModule中你会发现auth-schema-mysql.sql&auth-schema-p

php - 在 CakePHP Auth 中允许整个 Controller 并且 allow() 不起作用

我已经尝试过$this->Auth->allow()inbeforeFilter()但是,我需要添加整个Controller作为异常(exception),即它需要公开并且不需要用户登录。只是一种执行$this->Auth->allow(every-function-in-this-controller)的快捷方式答案?编辑:我有这个:Auth->allow('index');}publicfunctionindex(){$this->layout='main';$this->set('Hello',"Helloworld");}}正在调用Auth-login()

php -v 返回 dyld : Library not loaded:/usr/local/opt/readline/lib/libreadline. 7.dylib

我试图安装Valet,但由于错误,我从brew中卸载了php,现在我重新安装了php,如果我转到apache上的phpinfo()文件,我可以看到PHPVersion7.1.23但如果我在控制台上执行php-v或其他php命令,我会得到:dyld:Librarynotloaded:/usr/local/opt/readline/lib/libreadline.7.dylibReferencedfrom:/usr/local/bin/phpReason:imagenotfoundAborttrap:6我在MacOsSierra上 最佳答案

php - Kohana Auth 模块无法登录

对于那些熟悉Kohana中的Auth模块的人来说,我无法登录用户。我可以很好地创建用户,但显然哈希值不匹配。我已经使用提供的MySql模式来创建数据库,并且我正在使用模块模型。这是我创建的用户代码:publicfunctionuser_create(){$user=ORM::factory('user');$user->username="user";$this->auth=Auth::instance();$user->email="info@test.com";$user->password=$this->auth->hash_password('admin');$user->ad

php - Laravel 5 环境总是 'Production' 而实际上是 'Local'

我正在尝试设置两个环境:本地环境和生产环境。到目前为止,我已经添加了一个bootstrap/environment.php文件,它是:$env=$app->detectEnvironment(array('local'=>array('Ben'),'staging'=>array('staging.domain.org'),'production'=>array('domain.org'),));和两个.env文件-.local.env和.production.env具有不同的环境变量,例如:APP_ENV=local和APP_DEBUG=true。我笔记本电脑的主机名为Ben。我遇到

php - Laravel 5.2 Auth facade 和 Auth::guard($guard)

我是Laravel的新手。我正在浏览默认的身份验证中间件,我看到它正在使用:Auth::guard($guard)->guest()检查用户是否是访客。文档位于https://laravel.com/docs/5.2/authentication#retrieving-the-authenticated-user告诉我们可以使用:Auth::check()确定用户是否通过身份验证。(我想这与guest()相反?我尝试更改要使用的默认代码Auth::guest()我得到了完全相同的结果。我的问题是,在这种情况下,有没有guard($guard)->有什么区别?一个相关的问题。guest(

php - 防护 'Google_Auth_Exception' 获取 OAuth2 访问 token 时出错,消息 : 'invalid_client' ' error

我正在尝试通过gmailapi从Google获取邮件在收到token后对Google_Client进行身份验证时出现此错误fatalerror:未捕获异常“Google_Auth_Exception”,消息“获取OAuth2访问token时出错,消息:‘invalid_client’”在我的代码使用google-api-php-client-master很简单,我的代码如下require_once('config.php');require_once'autoload.php';$client=newGoogle_Client();$client->setScopes(array('h