Skip to content

Commit 4bb59e7

Browse files
committed
Initial commit of auth component.
Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>
1 parent 24baf46 commit 4bb59e7

4 files changed

Lines changed: 35 additions & 1 deletion

File tree

components/auth/driver.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php namespace Feather\Components\Auth;
2+
3+
class Driver extends \Laravel\Auth\Drivers\Driver {
4+
5+
}

components/auth/protector.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php namespace Feather\Components\Auth;
2+
3+
class Protector {
4+
5+
public function something()
6+
{
7+
return 'rabbits';
8+
}
9+
10+
}

config/feather.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,15 @@
4242
|
4343
*/
4444

45-
'components' => array(),
45+
'components' => array(
46+
'auth' => function($feather)
47+
{
48+
$feather['auth'] = $feather->share(function($feather)
49+
{
50+
return new Feather\Components\Auth\Protector;
51+
});
52+
}
53+
),
4654

4755
/*
4856
|--------------------------------------------------------------------------

start/facades.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,15 @@ class Config extends Components\Support\Facade {
99
*/
1010
protected static function accessor(){ return 'config'; }
1111

12+
}
13+
14+
class Auth extends Components\Support\Facade {
15+
16+
/**
17+
* Gets the name of the facade component.
18+
*
19+
* @return string
20+
*/
21+
protected static function accessor(){ return 'auth'; }
22+
1223
}

0 commit comments

Comments
 (0)