1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Added social sign in

This commit is contained in:
Dan Brown
2015-09-04 17:16:58 +01:00
parent 48814b8984
commit 2dcc5105ad
20 changed files with 578 additions and 32 deletions

View File

@ -22,8 +22,7 @@ class Handler extends ExceptionHandler
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Exception $e
* @return void
* @param \Exception $e
*/
public function report(Exception $e)
{
@ -39,6 +38,11 @@ class Handler extends ExceptionHandler
*/
public function render($request, Exception $e)
{
if($e instanceof NotifyException) {
\Session::flash('error', $e->message);
return response()->redirectTo($e->redirectLocation);
}
return parent::render($request, $e);
}
}

View File

@ -0,0 +1,21 @@
<?php namespace Oxbow\Exceptions;
class NotifyException extends \Exception
{
public $message;
public $redirectLocation;
/**
* NotifyException constructor.
* @param string $message
* @param string $redirectLocation
*/
public function __construct($message, $redirectLocation)
{
$this->message = $message;
$this->redirectLocation = $redirectLocation;
parent::__construct();
}
}

View File

@ -0,0 +1,6 @@
<?php namespace Oxbow\Exceptions;
class SocialDriverNotConfigured extends \Exception
{
}

View File

@ -0,0 +1,7 @@
<?php namespace Oxbow\Exceptions;
class UserNotFound extends NotifyException
{
}