-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Christopher Mühl
committed
Jan 3, 2018
1 parent
ccd153e
commit 47c6ee7
Showing
7 changed files
with
83 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,19 +5,19 @@ | |
"require": { | ||
"robthree/twofactorauth": "^1.6" | ||
}, | ||
"license": "LGPL-3.0", | ||
"autoload": { | ||
"psr-4": { | ||
"DieSchittigs\\TwoFactorAuth\\": "src/" | ||
} | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "Christopher Mühl", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"license": "LGPL-3.0", | ||
"autoload": { | ||
"psr-4": { | ||
"DieSchittigs\\TwoFactorAuth\\": "src/" | ||
} | ||
}, | ||
"extra": { | ||
"contao-manager-plugin": "DieSchittigs\\TwoFactorAuthBundle\\ContaoManager\\Plugin" | ||
"contao-manager-plugin": "DieSchittigs\\TwoFactorAuth\\ContaoManager\\Plugin" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace DieSchittigs\TwoFactorAuth\ContaoManager; | ||
|
||
use Contao\ManagerPlugin\Bundle\Config\BundleConfig; | ||
use Contao\ManagerPlugin\Bundle\BundlePluginInterface; | ||
use Contao\ManagerPlugin\Bundle\Parser\ParserInterface; | ||
use DieSchittigs\TwoFactorAuth\TwoFactorAuthBundle; | ||
|
||
class Plugin implements BundlePluginInterface | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getBundles(ParserInterface $parser) | ||
{ | ||
return [ | ||
BundleConfig::create('DieSchittigs\TwoFactorAuth\TwoFactorAuthBundle') | ||
->setLoadAfter(['Contao\CoreBundle\ContaoCoreBundle']) | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace DieSchittigs\TwoFactorAuth\DependencyInjection; | ||
|
||
use Symfony\Component\HttpKernel\DependencyInjection\Extension; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; | ||
use Symfony\Component\Config\FileLocator; | ||
|
||
class TwoFactorAuthExtension extends Extension | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function load(array $configs, ContainerBuilder $container) | ||
{ | ||
$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); | ||
$loader->load('parameters.yml'); | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
|
||
|
||
var_dump("hi"); | ||
die(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
$GLOBALS['TL_DCA']['tl_user']['fields']['tfaSecret'] = [ | ||
'label' => '2FA Secret', | ||
'exclude' => true, | ||
'sql' => "varchar(64) NOT NULL default ''" | ||
]; | ||
|
||
$GLOBALS['TL_DCA']['tl_user']['palettes']['admin'] .= ',tfaSecret'; | ||
|
||
var_dump($GLOBALS['TL_DCA']['tl_user']); | ||
die(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace DieSchittigs\TwoFactorAuth; | ||
|
||
use Symfony\Component\HttpKernel\Bundle\Bundle; | ||
use DieSchittigs\TwoFactorAuth\DependencyInjection\TwoFactorAuthExtension; | ||
|
||
class TwoFactorAuthBundle extends Bundle | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getContainerExtension() | ||
{ | ||
return new TwoFactorAuthExtension(); | ||
} | ||
} |