Skip to content

Commit bc3db48

Browse files
committed
Various fixes for typos.
1 parent 16140cf commit bc3db48

File tree

6 files changed

+17
-9
lines changed

6 files changed

+17
-9
lines changed

src/AuthBroker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function challenge(HasDeviceAuthorizations $user, $fingerprint, $browser,
6565
$authorization = $this->newAuthorization($user, $fingerprint, $browser, $ip);
6666

6767
// Send the request and verification token
68-
$user->notify(new $this->config['notification']($token, $browser, $ip));
68+
$user->notify(new $this->config['notification']($authorization->verify_token, $browser, $ip));
6969

7070
$this->event(new Events\Challenged($authorization));
7171

src/Contracts/HasDeviceAuthorizations.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66

77
interface HasDeviceAuthorizations
88
{
9+
/**
10+
* Send the given notification.
11+
*
12+
* @param mixed $instance
13+
* @return void
14+
*/
15+
public function notify($instance);
16+
917
/**
1018
* Determine whether the user can authorize devices.
1119
*

src/Http/Traits/DeviceAuthorization.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function challenge(Request $request)
2424

2525
$fingerprint = $this->manager()->fingerprint($request);
2626

27-
$browser = $this->manager()->resolveBrowserFromRequest($request);
27+
$browser = $this->manager()->resolveBrowserNameFromRequest($request);
2828

2929
$ip = $this->manager()->resolveAddressFromRequest($request);
3030

src/Http/routes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
Route::get('/auth/device/error', $authController.'@showError')->name('device.error');
99
Route::get('/auth/device/challenge', $authController.'@challenge')->name('device.challenge')->middleware('throttle:10,1');
1010
Route::get('/auth/device/challenged', $authController.'@showChallenged')->name('device.challenged');
11-
Route::get('/auth/device/verify/{token}', $authController.'@verify')->name('device.verify')->middleware('throttle:10,1');
11+
Route::get('/auth/device/verify/{token}', $authController.'@verifyAndAuthorize')->name('device.verify')->middleware('throttle:10,1');
1212
});

src/Models/DeviceAuthorization.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ public function scopePending($query, $verify_token = null)
9595
{
9696
$query->whereNull('verified_at');
9797

98-
if ($token) {
99-
$query->where('verify_token', '=', $token);
98+
if ($verify_token) {
99+
$query->where('verify_token', '=', $verify_token);
100100
}
101101
}
102102

src/Notifications/AuthorizationRequest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,28 @@ class AuthorizationRequest extends Notification
1616
*
1717
* @var string
1818
*/
19-
protected $verifyToken;
19+
public $verifyToken;
2020

2121
/**
2222
* The IP address the notification was request from.
2323
*
2424
* @var string
2525
*/
26-
protected $ip;
26+
public $ip;
2727

2828
/**
2929
* The browser name the notification was requested from.
3030
*
3131
* @var string
3232
*/
33-
protected $browser;
33+
public $browser;
3434

3535
/**
3636
* Create a new notification instance.
3737
*
3838
* @return void
3939
*/
40-
public function __construct($verify_token, $ip, $browser)
40+
public function __construct($verifyToken, $browser, $ip)
4141
{
4242
$this->verifyToken = $verifyToken;
4343

0 commit comments

Comments
 (0)