mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #7582 from turbo124/v5-develop
Appropriately refresh sending tokens
This commit is contained in:
commit
442bad25bf
@ -332,11 +332,6 @@ class LoginController extends BaseController
|
||||
if (request()->input('provider') == 'google') {
|
||||
return $this->handleGoogleOauth();
|
||||
} elseif (request()->input('provider') == 'microsoft') {
|
||||
// if (request()->has('token')) {
|
||||
// return $this->handleSocialiteLogin('microsoft', request()->get('token'));
|
||||
// } else {
|
||||
// $message = 'Bearer token missing for the microsoft login';
|
||||
// }
|
||||
return $this->handleMicrosoftOauth();
|
||||
} elseif (request()->input('provider') == 'apple') {
|
||||
// if (request()->has('token')) {
|
||||
@ -501,7 +496,7 @@ class LoginController extends BaseController
|
||||
elseif(request()->has('access_token'))
|
||||
$accessToken = request()->input('access_token');
|
||||
else
|
||||
return response()->json(['message' => 'Invalid response from oauth server'], 400);
|
||||
return response()->json(['message' => 'Invalid response from oauth server, no access token in response.'], 400);
|
||||
|
||||
$graph = new \Microsoft\Graph\Graph();
|
||||
$graph->setAccessToken($accessToken);
|
||||
@ -512,7 +507,6 @@ class LoginController extends BaseController
|
||||
|
||||
if($user){
|
||||
|
||||
$account = request()->input('account');
|
||||
$email = $user->getMail() ?: $user->getUserPrincipalName();
|
||||
|
||||
$query = [
|
||||
@ -553,6 +547,8 @@ class LoginController extends BaseController
|
||||
|
||||
}
|
||||
|
||||
return response()->json(['message' => 'Unable to authenticate this user'], 400);
|
||||
|
||||
}
|
||||
|
||||
private function existingOauthUser($existing_user)
|
||||
@ -772,6 +768,8 @@ class LoginController extends BaseController
|
||||
|
||||
$oauth_user_token = $socialite_user->accessTokenResponseBody['access_token'];
|
||||
|
||||
$oauth_expiry = now()->addSeconds($socialite_user->accessTokenResponseBody['expires_in']) ?: now()->addSeconds(300);
|
||||
|
||||
if($user = OAuth::handleAuth($socialite_user, $provider))
|
||||
{
|
||||
|
||||
@ -785,7 +783,8 @@ class LoginController extends BaseController
|
||||
'oauth_user_id' => $socialite_user->getId(),
|
||||
'oauth_provider_id' => $provider,
|
||||
'oauth_user_token' => $oauth_user_token,
|
||||
'oauth_user_refresh_token' => $socialite_user->accessTokenResponseBody['refresh_token']
|
||||
'oauth_user_refresh_token' => $socialite_user->accessTokenResponseBody['refresh_token'],
|
||||
'oauth_user_token_expiry' => $oauth_expiry,
|
||||
];
|
||||
|
||||
$user->update($update_user);
|
||||
|
@ -25,6 +25,7 @@ use App\Models\GatewayType;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\RecurringInvoice;
|
||||
use App\Models\Subscription;
|
||||
use App\Notifications\Ninja\NewAccountNotification;
|
||||
use App\Repositories\SubscriptionRepository;
|
||||
use App\Utils\Ninja;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
@ -165,6 +166,9 @@ class NinjaPlanController extends Controller
|
||||
->increment()
|
||||
->queue();
|
||||
|
||||
$ninja_company = Company::on('db-ninja-01')->find(config('ninja.ninja_default_company_id'));
|
||||
$ninja_company->notification(new NewAccountNotification($account, $client))->ninja();
|
||||
|
||||
return $this->render('plan.trial_confirmed', $data);
|
||||
|
||||
}
|
||||
|
@ -342,23 +342,40 @@ class NinjaMailerJob implements ShouldQueue
|
||||
|
||||
private function refreshOfficeToken($user)
|
||||
{
|
||||
$guzzle = new \GuzzleHttp\Client();
|
||||
$url = 'https://login.microsoftonline.com/common/oauth2/v2.0/token';
|
||||
$expiry = $user->oauth_user_token_expiry ?: now()->subDay();
|
||||
|
||||
$token = json_decode($guzzle->post($url, [
|
||||
'form_params' => [
|
||||
'client_id' => config('ninja.o365.client_id') ,
|
||||
'client_secret' => config('ninja.o365.client_secret') ,
|
||||
'scope' => 'email Mail.ReadWrite Mail.Send offline_access profile User.Read openid',
|
||||
'grant_type' => 'refresh_token',
|
||||
'refresh_token' => $user->oauth_user_refresh_token
|
||||
],
|
||||
])->getBody()->getContents());
|
||||
if($expiry->lt(now()))
|
||||
{
|
||||
$guzzle = new \GuzzleHttp\Client();
|
||||
$url = 'https://login.microsoftonline.com/common/oauth2/v2.0/token';
|
||||
|
||||
if($token)
|
||||
return $token->access_token;
|
||||
$token = json_decode($guzzle->post($url, [
|
||||
'form_params' => [
|
||||
'client_id' => config('ninja.o365.client_id') ,
|
||||
'client_secret' => config('ninja.o365.client_secret') ,
|
||||
'scope' => 'email Mail.ReadWrite Mail.Send offline_access profile User.Read openid',
|
||||
'grant_type' => 'refresh_token',
|
||||
'refresh_token' => $user->oauth_user_refresh_token
|
||||
],
|
||||
])->getBody()->getContents());
|
||||
|
||||
return false;
|
||||
nlog($token);
|
||||
|
||||
if($token){
|
||||
|
||||
$user->oauth_user_refresh_token = property_exists($token, 'refresh_token') ? $token->refresh_token : $user->oauth_user_refresh_token;
|
||||
$user->oauth_user_token = $token->access_token;
|
||||
$user->oauth_user_token_expiry = now()->addSeconds($token->expires_in);
|
||||
$user->save();
|
||||
|
||||
return $token->access_token;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return $user->oauth_user_refresh_token;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -106,6 +106,7 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
'updated_at' => 'timestamp',
|
||||
'created_at' => 'timestamp',
|
||||
'deleted_at' => 'timestamp',
|
||||
'oauth_user_token_expiry' => 'datetime',
|
||||
];
|
||||
|
||||
|
||||
|
93
app/Notifications/Ninja/NewAccountNotification.php
Normal file
93
app/Notifications/Ninja/NewAccountNotification.php
Normal file
@ -0,0 +1,93 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com)
|
||||
*
|
||||
* @license https://www.elastic.co/licensing/elastic-license
|
||||
*/
|
||||
|
||||
namespace App\Notifications\Ninja;
|
||||
|
||||
use App\Models\Account;
|
||||
use App\Models\Client;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Messages\SlackMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class NewAccountNotification extends Notification
|
||||
{
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
protected Account $account;
|
||||
|
||||
protected Client $client;
|
||||
|
||||
public function __construct(Account $account, Client $client)
|
||||
{
|
||||
$this->account = $account;
|
||||
$this->client = $client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the notification's delivery channels.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return array
|
||||
*/
|
||||
public function via($notifiable)
|
||||
{
|
||||
return ['slack'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the mail representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return MailMessage
|
||||
*/
|
||||
public function toMail($notifiable)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the array representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($notifiable)
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
public function toSlack($notifiable)
|
||||
{
|
||||
$content = "New Trial Started\n";
|
||||
$content = "{$this->client->name}\n";
|
||||
$content = "Account key: {$this->account->key}\n";
|
||||
$content = "Users: {$this->account->users()->pluck('email')}\n";
|
||||
$content = "Contacts: {$this->client->contacts()->pluck('email')}\n";
|
||||
|
||||
|
||||
return (new SlackMessage)
|
||||
->success()
|
||||
->from(ctrans('texts.notification_bot'))
|
||||
->image('https://app.invoiceninja.com/favicon.png')
|
||||
->content($content);
|
||||
}
|
||||
}
|
121
app/Notifications/Ninja/SpamNotification.php
Normal file
121
app/Notifications/Ninja/SpamNotification.php
Normal file
@ -0,0 +1,121 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com)
|
||||
*
|
||||
* @license https://www.elastic.co/licensing/elastic-license
|
||||
*/
|
||||
|
||||
namespace App\Notifications\Ninja;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Messages\SlackMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class SpamNotification extends Notification
|
||||
{
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
protected array $spam_list;
|
||||
|
||||
public function __construct($spam_list)
|
||||
{
|
||||
$this->spam_list = $spam_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the notification's delivery channels.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return array
|
||||
*/
|
||||
public function via($notifiable)
|
||||
{
|
||||
return ['slack'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the mail representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return MailMessage
|
||||
*/
|
||||
public function toMail($notifiable)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the array representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($notifiable)
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
public function toSlack($notifiable)
|
||||
{
|
||||
$content = '';
|
||||
|
||||
foreach($this->spam_list as $spam_list)
|
||||
{
|
||||
|
||||
if(array_key_exists('companies', $spam_list))
|
||||
{
|
||||
$content .= " Companies \n";
|
||||
|
||||
foreach($spam_list['companies'] as $company)
|
||||
{
|
||||
$content .= "{$company['name']} - c_key={$company['company_key']} - a_key={$company['account_key']} - {$company['owner']} \n";
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists('templates', $spam_list))
|
||||
{
|
||||
$content .= " Templates \n";
|
||||
|
||||
foreach($spam_list['templates'] as $company)
|
||||
{
|
||||
$content .= "{$company['name']} - c_key={$company['company_key']} - a_key={$company['account_key']} - {$company['owner']} \n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(array_key_exists('users', $spam_list))
|
||||
{
|
||||
|
||||
$content .= ' Users \n';
|
||||
|
||||
foreach($spam_list['users'] as $user)
|
||||
{
|
||||
$content .= "{$user['email']} - a_key={$user['account_key']} - created={$user['created']} \n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return (new SlackMessage)
|
||||
->success()
|
||||
->from(ctrans('texts.notification_bot'))
|
||||
->image('https://app.invoiceninja.com/favicon.png')
|
||||
->content($content);
|
||||
}
|
||||
}
|
157
composer.lock
generated
157
composer.lock
generated
@ -434,16 +434,16 @@
|
||||
},
|
||||
{
|
||||
"name": "aws/aws-sdk-php",
|
||||
"version": "3.225.5",
|
||||
"version": "3.228.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||
"reference": "09b404c6b80b9c31be15fa245e647a2f9fb5e733"
|
||||
"reference": "53b7f43945b19bb0700c75d4c5f130055096e817"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/09b404c6b80b9c31be15fa245e647a2f9fb5e733",
|
||||
"reference": "09b404c6b80b9c31be15fa245e647a2f9fb5e733",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/53b7f43945b19bb0700c75d4c5f130055096e817",
|
||||
"reference": "53b7f43945b19bb0700c75d4c5f130055096e817",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -451,9 +451,9 @@
|
||||
"ext-json": "*",
|
||||
"ext-pcre": "*",
|
||||
"ext-simplexml": "*",
|
||||
"guzzlehttp/guzzle": "^5.3.3 || ^6.2.1 || ^7.0",
|
||||
"guzzlehttp/guzzle": "^6.5.7 || ^7.4.4",
|
||||
"guzzlehttp/promises": "^1.4.0",
|
||||
"guzzlehttp/psr7": "^1.7.0 || ^2.1.1",
|
||||
"guzzlehttp/psr7": "^1.8.5 || ^2.3",
|
||||
"mtdowling/jmespath.php": "^2.6",
|
||||
"php": ">=5.5"
|
||||
},
|
||||
@ -519,9 +519,9 @@
|
||||
"support": {
|
||||
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
|
||||
"issues": "https://github.com/aws/aws-sdk-php/issues",
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.225.5"
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.228.1"
|
||||
},
|
||||
"time": "2022-06-15T19:35:13+00:00"
|
||||
"time": "2022-06-22T18:16:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "bacon/bacon-qr-code",
|
||||
@ -1303,16 +1303,16 @@
|
||||
},
|
||||
{
|
||||
"name": "doctrine/dbal",
|
||||
"version": "3.3.6",
|
||||
"version": "3.3.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/dbal.git",
|
||||
"reference": "9e7f76dd1cde81c62574fdffa5a9c655c847ad21"
|
||||
"reference": "9f79d4650430b582f4598fe0954ef4d52fbc0a8a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/dbal/zipball/9e7f76dd1cde81c62574fdffa5a9c655c847ad21",
|
||||
"reference": "9e7f76dd1cde81c62574fdffa5a9c655c847ad21",
|
||||
"url": "https://api.github.com/repos/doctrine/dbal/zipball/9f79d4650430b582f4598fe0954ef4d52fbc0a8a",
|
||||
"reference": "9f79d4650430b582f4598fe0954ef4d52fbc0a8a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1327,11 +1327,11 @@
|
||||
"require-dev": {
|
||||
"doctrine/coding-standard": "9.0.0",
|
||||
"jetbrains/phpstorm-stubs": "2022.1",
|
||||
"phpstan/phpstan": "1.6.3",
|
||||
"phpstan/phpstan": "1.7.13",
|
||||
"phpstan/phpstan-strict-rules": "^1.2",
|
||||
"phpunit/phpunit": "9.5.20",
|
||||
"psalm/plugin-phpunit": "0.16.1",
|
||||
"squizlabs/php_codesniffer": "3.6.2",
|
||||
"squizlabs/php_codesniffer": "3.7.0",
|
||||
"symfony/cache": "^5.2|^6.0",
|
||||
"symfony/console": "^2.7|^3.0|^4.0|^5.0|^6.0",
|
||||
"vimeo/psalm": "4.23.0"
|
||||
@ -1394,7 +1394,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/doctrine/dbal/issues",
|
||||
"source": "https://github.com/doctrine/dbal/tree/3.3.6"
|
||||
"source": "https://github.com/doctrine/dbal/tree/3.3.7"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1410,7 +1410,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-05-02T17:21:01+00:00"
|
||||
"time": "2022-06-13T21:43:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/deprecations",
|
||||
@ -2294,16 +2294,16 @@
|
||||
},
|
||||
{
|
||||
"name": "google/apiclient-services",
|
||||
"version": "v0.253.0",
|
||||
"version": "v0.254.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/googleapis/google-api-php-client-services.git",
|
||||
"reference": "70c62b17f7821526cb52c6f125254dc51f256109"
|
||||
"reference": "e1b16659df899f3bdf5c798358c256a9cc01efeb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/70c62b17f7821526cb52c6f125254dc51f256109",
|
||||
"reference": "70c62b17f7821526cb52c6f125254dc51f256109",
|
||||
"url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/e1b16659df899f3bdf5c798358c256a9cc01efeb",
|
||||
"reference": "e1b16659df899f3bdf5c798358c256a9cc01efeb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2332,9 +2332,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/googleapis/google-api-php-client-services/issues",
|
||||
"source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.253.0"
|
||||
"source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.254.0"
|
||||
},
|
||||
"time": "2022-06-13T01:06:12+00:00"
|
||||
"time": "2022-06-19T01:16:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "google/auth",
|
||||
@ -2516,22 +2516,22 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "7.4.4",
|
||||
"version": "7.4.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "e3ff079b22820c2029d4c2a87796b6a0b8716ad8"
|
||||
"reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/e3ff079b22820c2029d4c2a87796b6a0b8716ad8",
|
||||
"reference": "e3ff079b22820c2029d4c2a87796b6a0b8716ad8",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/1dd98b0564cb3f6bd16ce683cb755f94c10fbd82",
|
||||
"reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"guzzlehttp/promises": "^1.5",
|
||||
"guzzlehttp/psr7": "^1.8.3 || ^2.1",
|
||||
"guzzlehttp/psr7": "^1.9 || ^2.4",
|
||||
"php": "^7.2.5 || ^8.0",
|
||||
"psr/http-client": "^1.0",
|
||||
"symfony/deprecation-contracts": "^2.2 || ^3.0"
|
||||
@ -2620,7 +2620,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/guzzle/issues",
|
||||
"source": "https://github.com/guzzle/guzzle/tree/7.4.4"
|
||||
"source": "https://github.com/guzzle/guzzle/tree/7.4.5"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -2636,7 +2636,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-06-09T21:39:15+00:00"
|
||||
"time": "2022-06-20T22:16:13+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
@ -2724,16 +2724,16 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "2.3.0",
|
||||
"version": "2.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "83260bb50b8fc753c72d14dc1621a2dac31877ee"
|
||||
"reference": "13388f00956b1503577598873fffb5ae994b5737"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/83260bb50b8fc753c72d14dc1621a2dac31877ee",
|
||||
"reference": "83260bb50b8fc753c72d14dc1621a2dac31877ee",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/13388f00956b1503577598873fffb5ae994b5737",
|
||||
"reference": "13388f00956b1503577598873fffb5ae994b5737",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2757,7 +2757,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.3-dev"
|
||||
"dev-master": "2.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@ -2819,7 +2819,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/psr7/issues",
|
||||
"source": "https://github.com/guzzle/psr7/tree/2.3.0"
|
||||
"source": "https://github.com/guzzle/psr7/tree/2.4.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -2835,7 +2835,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-06-09T08:26:02+00:00"
|
||||
"time": "2022-06-20T21:43:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "halaxa/json-machine",
|
||||
@ -3332,17 +3332,17 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/invoiceninja/inspector.git",
|
||||
"reference": "3f5beb9854c0d1d6f65bc0d9ba847503e6e84583"
|
||||
"reference": "307b0e4b90dd0ebf062f90ece4d46399202aa73e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/invoiceninja/inspector/zipball/3f5beb9854c0d1d6f65bc0d9ba847503e6e84583",
|
||||
"reference": "3f5beb9854c0d1d6f65bc0d9ba847503e6e84583",
|
||||
"url": "https://api.github.com/repos/invoiceninja/inspector/zipball/307b0e4b90dd0ebf062f90ece4d46399202aa73e",
|
||||
"reference": "307b0e4b90dd0ebf062f90ece4d46399202aa73e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/dbal": "^3.1",
|
||||
"illuminate/support": "^8.0",
|
||||
"illuminate/support": "^8.0|^9.0",
|
||||
"php": "^7.4|^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
@ -3385,9 +3385,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/invoiceninja/inspector/issues",
|
||||
"source": "https://github.com/invoiceninja/inspector/tree/main"
|
||||
"source": "https://github.com/invoiceninja/inspector/tree/v1.0"
|
||||
},
|
||||
"time": "2021-09-11T11:35:02+00:00"
|
||||
"time": "2022-06-22T11:16:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jean85/pretty-package-versions",
|
||||
@ -3500,16 +3500,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v8.83.16",
|
||||
"version": "v8.83.17",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "6be5abd144faf517879af7298e9d79f06f250f75"
|
||||
"reference": "2cf142cd5100b02da248acad3988bdaba5635e16"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/6be5abd144faf517879af7298e9d79f06f250f75",
|
||||
"reference": "6be5abd144faf517879af7298e9d79f06f250f75",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/2cf142cd5100b02da248acad3988bdaba5635e16",
|
||||
"reference": "2cf142cd5100b02da248acad3988bdaba5635e16",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -3669,7 +3669,7 @@
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2022-06-07T15:09:06+00:00"
|
||||
"time": "2022-06-21T14:38:31+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/serializable-closure",
|
||||
@ -4930,16 +4930,16 @@
|
||||
},
|
||||
{
|
||||
"name": "microsoft/microsoft-graph",
|
||||
"version": "1.69.0",
|
||||
"version": "1.70.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/microsoftgraph/msgraph-sdk-php.git",
|
||||
"reference": "dc867afdb2c89ea7ead37d6bcfcaf0389e7a85f4"
|
||||
"reference": "7d85293be037c4a2891a03cb953eb204bf68387e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/microsoftgraph/msgraph-sdk-php/zipball/dc867afdb2c89ea7ead37d6bcfcaf0389e7a85f4",
|
||||
"reference": "dc867afdb2c89ea7ead37d6bcfcaf0389e7a85f4",
|
||||
"url": "https://api.github.com/repos/microsoftgraph/msgraph-sdk-php/zipball/7d85293be037c4a2891a03cb953eb204bf68387e",
|
||||
"reference": "7d85293be037c4a2891a03cb953eb204bf68387e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -4975,9 +4975,9 @@
|
||||
"homepage": "https://developer.microsoft.com/en-us/graph",
|
||||
"support": {
|
||||
"issues": "https://github.com/microsoftgraph/msgraph-sdk-php/issues",
|
||||
"source": "https://github.com/microsoftgraph/msgraph-sdk-php/tree/1.69.0"
|
||||
"source": "https://github.com/microsoftgraph/msgraph-sdk-php/tree/1.70.0"
|
||||
},
|
||||
"time": "2022-06-15T11:11:33+00:00"
|
||||
"time": "2022-06-21T13:37:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mollie/mollie-api-php",
|
||||
@ -5324,16 +5324,16 @@
|
||||
},
|
||||
{
|
||||
"name": "nelexa/zip",
|
||||
"version": "4.0.1",
|
||||
"version": "4.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Ne-Lexa/php-zip.git",
|
||||
"reference": "a18f80db509b1b6e9798e2745dc100759107f50c"
|
||||
"reference": "88a1b6549be813278ff2dd3b6b2ac188827634a7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Ne-Lexa/php-zip/zipball/a18f80db509b1b6e9798e2745dc100759107f50c",
|
||||
"reference": "a18f80db509b1b6e9798e2745dc100759107f50c",
|
||||
"url": "https://api.github.com/repos/Ne-Lexa/php-zip/zipball/88a1b6549be813278ff2dd3b6b2ac188827634a7",
|
||||
"reference": "88a1b6549be813278ff2dd3b6b2ac188827634a7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -5391,9 +5391,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/Ne-Lexa/php-zip/issues",
|
||||
"source": "https://github.com/Ne-Lexa/php-zip/tree/4.0.1"
|
||||
"source": "https://github.com/Ne-Lexa/php-zip/tree/4.0.2"
|
||||
},
|
||||
"time": "2021-12-12T09:50:45+00:00"
|
||||
"time": "2022-06-17T11:17:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nesbot/carbon",
|
||||
@ -5778,16 +5778,16 @@
|
||||
},
|
||||
{
|
||||
"name": "nyholm/psr7",
|
||||
"version": "1.5.0",
|
||||
"version": "1.5.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Nyholm/psr7.git",
|
||||
"reference": "1461e07a0f2a975a52082ca3b769ca912b816226"
|
||||
"reference": "f734364e38a876a23be4d906a2a089e1315be18a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Nyholm/psr7/zipball/1461e07a0f2a975a52082ca3b769ca912b816226",
|
||||
"reference": "1461e07a0f2a975a52082ca3b769ca912b816226",
|
||||
"url": "https://api.github.com/repos/Nyholm/psr7/zipball/f734364e38a876a23be4d906a2a089e1315be18a",
|
||||
"reference": "f734364e38a876a23be4d906a2a089e1315be18a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -5839,7 +5839,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/Nyholm/psr7/issues",
|
||||
"source": "https://github.com/Nyholm/psr7/tree/1.5.0"
|
||||
"source": "https://github.com/Nyholm/psr7/tree/1.5.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -5851,7 +5851,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2022-02-02T18:37:57+00:00"
|
||||
"time": "2022-06-22T07:13:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "omnipay/common",
|
||||
@ -11440,21 +11440,21 @@
|
||||
},
|
||||
{
|
||||
"name": "turbo124/beacon",
|
||||
"version": "1.1.1",
|
||||
"version": "v1.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/turbo124/beacon.git",
|
||||
"reference": "e2e1e83b54699051783a8f1dbd36a33c45130ee2"
|
||||
"reference": "3e3bd337f91666ae793b6682ef40fd228aa6f185"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/turbo124/beacon/zipball/e2e1e83b54699051783a8f1dbd36a33c45130ee2",
|
||||
"reference": "e2e1e83b54699051783a8f1dbd36a33c45130ee2",
|
||||
"url": "https://api.github.com/repos/turbo124/beacon/zipball/3e3bd337f91666ae793b6682ef40fd228aa6f185",
|
||||
"reference": "3e3bd337f91666ae793b6682ef40fd228aa6f185",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"guzzlehttp/guzzle": "^7",
|
||||
"illuminate/support": "^6.0|^7.0|^8.0",
|
||||
"illuminate/support": "^6.0|^7.0|^8.0|^9.0",
|
||||
"php": "^7.3|^7.4|^8"
|
||||
},
|
||||
"require-dev": {
|
||||
@ -11497,9 +11497,9 @@
|
||||
"turbo124"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/turbo124/beacon/tree/1.1.1"
|
||||
"source": "https://github.com/turbo124/beacon/tree/v1.2.0"
|
||||
},
|
||||
"time": "2022-04-16T14:05:40+00:00"
|
||||
"time": "2022-06-22T11:22:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "turbo124/laravel-gmail",
|
||||
@ -14244,16 +14244,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "9.5.20",
|
||||
"version": "9.5.21",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba"
|
||||
"reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/12bc8879fb65aef2138b26fc633cb1e3620cffba",
|
||||
"reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0e32b76be457de00e83213528f6bb37e2a38fcb1",
|
||||
"reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -14287,7 +14287,6 @@
|
||||
"sebastian/version": "^3.0.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-pdo": "*",
|
||||
"phpspec/prophecy-phpunit": "^2.0.1"
|
||||
},
|
||||
"suggest": {
|
||||
@ -14331,7 +14330,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.20"
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.21"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -14343,7 +14342,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2022-04-01T12:37:26+00:00"
|
||||
"time": "2022-06-19T12:14:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/cli-parser",
|
||||
|
@ -13,7 +13,7 @@ class FixesForDescriptionInPdfDesigns extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
\Illuminate\Support\Facades\Artisan::call('ninja:design-update');
|
||||
\Illuminate\Support\Facades\Artisan::call('ninja:design-update');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class SetOauthExpiryColumn extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->datetime('oauth_user_token_expiry')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user