magium/auth0 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

magium/auth0

Composer 安装命令:

composer require --dev magium/auth0

包简介

Provides a mechanism for using the Auth0 authentication platform

README 文档

README

At the moment this project is a work in progress and only supports Twitter, though it is not difficult to add additional authentication methods (and they will be added).

The purpose of this library is to provide a means of doing browser test automation using the Auth0 service from within Magium.

Configuring your Twitter account

Create a file in your testing project called /configuration/Magium/Twitter/Identities/Twitter.php that contains your Twitter creds

<?php

/* @var $this \Magium\Twitter\Identities\Twitter */
$this->username = 'username';
$this->password = 'password';

Then in your Magium test simple ask the Auth0 action to authenticate for you.

<?php

namespace Tests\Magium\Auth0;

use Facebook\WebDriver\WebDriverBy;
use Magium\AbstractTestCase;
use Magium\Auth0\Actions\Login;
use Magium\Auth0\Identities\Twitter;
use Magium\WebDriver\ExpectedCondition;
use Magium\WebDriver\WebDriver;

class TwitterTest extends AbstractTestCase
{

    public function testTwitterAuth()
    {
        $this->commandOpen('http://magiumlib.loc/');
        $this->byText('Log In')->click();
        $action = $this->getAction(Login::ACTION);
        /* @var $action Login */
        $action->setIdentity($this->getIdentity(Twitter::IDENTITY));
        $action->execute();

        $this->webdriver->wait(5)->until(ExpectedCondition::elementExists('login-link'));

    }

}

BOOM! Authenticated.

统计信息

  • 总下载量: 21
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2016-04-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固