-
Notifications
You must be signed in to change notification settings - Fork 302
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
Showing
15 changed files
with
195 additions
and
28 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace Laravel\Fortify\Contracts; | ||
|
||
use Illuminate\Contracts\Support\Responsable; | ||
|
||
interface ProfileInformationUpdatedResponse extends Responsable | ||
{ | ||
// | ||
} |
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,10 @@ | ||
<?php | ||
|
||
namespace Laravel\Fortify\Contracts; | ||
|
||
use Illuminate\Contracts\Support\Responsable; | ||
|
||
interface RecoveryCodeResponse extends Responsable | ||
{ | ||
// | ||
} |
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,10 @@ | ||
<?php | ||
|
||
namespace Laravel\Fortify\Contracts; | ||
|
||
use Illuminate\Contracts\Support\Responsable; | ||
|
||
interface TwoFactorConfirmedResponse extends Responsable | ||
{ | ||
// | ||
} |
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,10 @@ | ||
<?php | ||
|
||
namespace Laravel\Fortify\Contracts; | ||
|
||
use Illuminate\Contracts\Support\Responsable; | ||
|
||
interface TwoFactorDisabledResponse extends Responsable | ||
{ | ||
// | ||
} |
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,10 @@ | ||
<?php | ||
|
||
namespace Laravel\Fortify\Contracts; | ||
|
||
use Illuminate\Contracts\Support\Responsable; | ||
|
||
interface TwoFactorEnabledResponse extends Responsable | ||
{ | ||
// | ||
} |
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
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
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
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
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
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,23 @@ | ||
<?php | ||
|
||
namespace Laravel\Fortify\Http\Responses; | ||
|
||
use Illuminate\Http\JsonResponse; | ||
use Laravel\Fortify\Contracts\ProfileInformationUpdatedResponse as ProfileInformationUpdatedResponseContract; | ||
use Laravel\Fortify\Fortify; | ||
|
||
class ProfileInformationUpdatedResponse implements ProfileInformationUpdatedResponseContract | ||
{ | ||
/** | ||
* Create an HTTP response that represents the object. | ||
* | ||
* @param \Illuminate\Http\Request $request | ||
* @return \Symfony\Component\HttpFoundation\Response | ||
*/ | ||
public function toResponse($request) | ||
{ | ||
return $request->wantsJson() | ||
? new JsonResponse('', 200) | ||
: back()->with('status', Fortify::PROFILE_INFORMATION_UPDATED); | ||
} | ||
} |
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,23 @@ | ||
<?php | ||
|
||
namespace Laravel\Fortify\Http\Responses; | ||
|
||
use Illuminate\Http\JsonResponse; | ||
use Laravel\Fortify\Contracts\PasswordUpdateResponse as PasswordUpdateResponseContract; | ||
use Laravel\Fortify\Fortify; | ||
|
||
class RecoveryCodeResponse implements PasswordUpdateResponseContract | ||
{ | ||
/** | ||
* Create an HTTP response that represents the object. | ||
* | ||
* @param \Illuminate\Http\Request $request | ||
* @return \Symfony\Component\HttpFoundation\Response | ||
*/ | ||
public function toResponse($request) | ||
{ | ||
return $request->wantsJson() | ||
? new JsonResponse('', 200) | ||
: back()->with('status', Fortify::RECOVERY_CODES_GENERATED); | ||
} | ||
} |
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,23 @@ | ||
<?php | ||
|
||
namespace Laravel\Fortify\Http\Responses; | ||
|
||
use Illuminate\Http\JsonResponse; | ||
use Laravel\Fortify\Contracts\TwoFactorConfirmedResponse as TwoFactorConfirmedResponseContract; | ||
use Laravel\Fortify\Fortify; | ||
|
||
class TwoFactorConfirmedResponse implements TwoFactorConfirmedResponseContract | ||
{ | ||
/** | ||
* Create an HTTP response that represents the object. | ||
* | ||
* @param \Illuminate\Http\Request $request | ||
* @return \Symfony\Component\HttpFoundation\Response | ||
*/ | ||
public function toResponse($request) | ||
{ | ||
return $request->wantsJson() | ||
? new JsonResponse('', 200) | ||
: back()->with('status', Fortify::TWO_FACTOR_AUTHENTICATION_CONFIRMED); | ||
} | ||
} |
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,23 @@ | ||
<?php | ||
|
||
namespace Laravel\Fortify\Http\Responses; | ||
|
||
use Illuminate\Http\JsonResponse; | ||
use Laravel\Fortify\Contracts\TwoFactorLoginResponse as TwoFactorLoginResponseContract; | ||
use Laravel\Fortify\Fortify; | ||
|
||
class TwoFactorDisabledResponse implements TwoFactorLoginResponseContract | ||
{ | ||
/** | ||
* Create an HTTP response that represents the object. | ||
* | ||
* @param \Illuminate\Http\Request $request | ||
* @return \Symfony\Component\HttpFoundation\Response | ||
*/ | ||
public function toResponse($request) | ||
{ | ||
return $request->wantsJson() | ||
? new JsonResponse('', 200) | ||
: back()->with('status', Fortify::TWO_FACTOR_AUTHENTICATION_DISABLED); | ||
} | ||
} |
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,23 @@ | ||
<?php | ||
|
||
namespace Laravel\Fortify\Http\Responses; | ||
|
||
use Illuminate\Http\JsonResponse; | ||
use Laravel\Fortify\Contracts\TwoFactorLoginResponse as TwoFactorLoginResponseContract; | ||
use Laravel\Fortify\Fortify; | ||
|
||
class TwoFactorEnabledResponse implements TwoFactorLoginResponseContract | ||
{ | ||
/** | ||
* Create an HTTP response that represents the object. | ||
* | ||
* @param \Illuminate\Http\Request $request | ||
* @return \Symfony\Component\HttpFoundation\Response | ||
*/ | ||
public function toResponse($request) | ||
{ | ||
return $request->wantsJson() | ||
? new JsonResponse('', 200) | ||
: back()->with('status', Fortify::TWO_FACTOR_AUTHENTICATION_ENABLED); | ||
} | ||
} |