Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
87f238ed
Commit
87f238ed
authored
Oct 25, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
97214232
'
* commit '
97214232
': Squashed 'Modules/User/' changes from 4417311..0fb1cbc
parents
222ec0a0
97214232
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
70 deletions
+6
-70
AuthController.php
Modules/User/Http/Controllers/AuthController.php
+2
-2
UserServiceProvider.php
Modules/User/Providers/UserServiceProvider.php
+2
-2
AuthenticationRepository.php
Modules/User/Repositories/AuthenticationRepository.php
+0
-64
SentinelAuthentication.php
...les/User/Repositories/Sentinel/SentinelAuthentication.php
+2
-2
No files found.
Modules/User/Http/Controllers/AuthController.php
View file @
87f238ed
...
...
@@ -4,13 +4,13 @@ use Illuminate\Support\Facades\Redirect;
use
Illuminate\Support\Facades\View
;
use
Laracasts\Commander\CommanderTrait
;
use
Laracasts\Flash\Flash
;
use
Modules\Core\Contracts\Authentication
;
use
Modules\User\Exceptions\InvalidOrExpiredResetCode
;
use
Modules\User\Exceptions\UserNotFoundException
;
use
Modules\User\Http\Requests\LoginRequest
;
use
Modules\User\Http\Requests\RegisterRequest
;
use
Modules\User\Http\Requests\ResetCompleteRequest
;
use
Modules\User\Http\Requests\ResetRequest
;
use
Modules\User\Repositories\AuthenticationRepository
;
class
AuthController
{
...
...
@@ -21,7 +21,7 @@ class AuthController
*/
private
$auth
;
public
function
__construct
(
Authentication
Repository
$auth
)
public
function
__construct
(
Authentication
$auth
)
{
$this
->
auth
=
$auth
;
}
...
...
Modules/User/Providers/UserServiceProvider.php
View file @
87f238ed
...
...
@@ -83,8 +83,8 @@ class UserServiceProvider extends ServiceProvider
'Modules\User\Repositories\Sentinel\SentinelRoleRepository'
);
$this
->
app
->
bind
(
'Modules\
User\Repositories\AuthenticationRepository
'
,
'Modules\User\Repositories\Sentinel\SentinelAuthentication
Repository
'
'Modules\
Core\Contracts\Authentication
'
,
'Modules\User\Repositories\Sentinel\SentinelAuthentication'
);
}
...
...
Modules/User/Repositories/AuthenticationRepository.php
deleted
100644 → 0
View file @
222ec0a0
<?php
namespace
Modules\User\Repositories
;
interface
AuthenticationRepository
{
/**
* Authenticate a user
* @param array $credentials
* @param bool $remember Remember the user
* @return mixed
*/
public
function
login
(
array
$credentials
,
$remember
=
false
);
/**
* Register a new user.
* @param array $user
* @return bool
*/
public
function
register
(
array
$user
);
/**
* Activate the given used id
* @param int $userId
* @param string $code
* @return mixed
*/
public
function
activate
(
$userId
,
$code
);
/**
* Assign a role to the given user.
* @param \Modules\User\Repositories\UserRepository $user
* @param \Modules\User\Repositories\RoleRepository $role
* @return mixed
*/
public
function
assignRole
(
$user
,
$role
);
/**
* Log the user out of the application.
* @return mixed
*/
public
function
logout
();
/**
* Create an activation code for the given user
* @param $user
* @return mixed
*/
public
function
createActivation
(
$user
);
/**
* Create a reminders code for the given user
* @param $user
* @return mixed
*/
public
function
createReminderCode
(
$user
);
/**
* Completes the reset password process
* @param $user
* @param string $code
* @param string $password
* @return bool
*/
public
function
completeResetPassword
(
$user
,
$code
,
$password
);
}
Modules/User/Repositories/Sentinel/SentinelAuthentication
Repository
.php
→
Modules/User/Repositories/Sentinel/SentinelAuthentication.php
View file @
87f238ed
...
...
@@ -5,9 +5,9 @@ use Cartalyst\Sentinel\Checkpoints\ThrottlingException;
use
Cartalyst\Sentinel\Laravel\Facades\Activation
;
use
Cartalyst\Sentinel\Laravel\Facades\Reminder
;
use
Cartalyst\Sentinel\Laravel\Facades\Sentinel
;
use
Modules\
User\Repositories\AuthenticationRepository
;
use
Modules\
Core\Contracts\Authentication
;
class
SentinelAuthentication
Repository
implements
AuthenticationRepository
class
SentinelAuthentication
implements
Authentication
{
/**
* Authenticate a user
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment