mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-10-29 12:43:25 +00:00
[Web] Update composer libraries
This commit is contained in:
1297 files changed
+71585
-24460
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013-2020 Alex Bilbie <hello@alexbilbie.com>
|
||||
Copyright (c) 2013-2023 Alex Bilbie <hello@alexbilbie.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
+4
-2
@@ -24,14 +24,16 @@ This package is compliant with [PSR-1][], [PSR-2][], [PSR-4][], and [PSR-7][]. I
|
||||
|
||||
We support the following versions of PHP:
|
||||
|
||||
* PHP 8.5
|
||||
* PHP 8.4
|
||||
* PHP 8.3
|
||||
* PHP 8.2
|
||||
* PHP 8.1
|
||||
* PHP 8.0
|
||||
* PHP 7.4
|
||||
* PHP 7.3
|
||||
* PHP 7.2
|
||||
* PHP 7.1
|
||||
* PHP 7.0
|
||||
* PHP 5.6
|
||||
|
||||
## Provider Clients
|
||||
|
||||
|
||||
+7
-11
@@ -6,15 +6,16 @@
|
||||
"sort-packages": true
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.6 || ^7.0 || ^8.0",
|
||||
"guzzlehttp/guzzle": "^6.0 || ^7.0",
|
||||
"paragonie/random_compat": "^1 || ^2 || ^9.99"
|
||||
"php": "^7.1 || >=8.0.0 <8.6.0",
|
||||
"ext-json": "*",
|
||||
"guzzlehttp/guzzle": "^6.5.8 || ^7.8.2 || ^8.0",
|
||||
"guzzlehttp/psr7": "^1.9.1 || ^2.6.3 || ^3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^1.3.5",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.3.1",
|
||||
"phpunit/phpunit": "^5.7 || ^6.0 || ^9.5",
|
||||
"squizlabs/php_codesniffer": "^2.3 || ^3.0"
|
||||
"php-parallel-lint/php-parallel-lint": "^1.4",
|
||||
"phpunit/phpunit": "^7 || ^8 || ^9 || ^10 || ^11",
|
||||
"squizlabs/php_codesniffer": "^3.11"
|
||||
},
|
||||
"keywords": [
|
||||
"oauth",
|
||||
@@ -49,10 +50,5 @@
|
||||
"psr-4": {
|
||||
"League\\OAuth2\\Client\\Test\\": "test/src/"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-2.x": "2.0.x-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
|
||||
bootstrap="./vendor/autoload.php"
|
||||
colors="true"
|
||||
cacheDirectory="build/phpunit">
|
||||
|
||||
<coverage>
|
||||
<report>
|
||||
<clover outputFile="build/logs/clover.xml"/>
|
||||
<html outputDirectory="build/coverage"/>
|
||||
<text outputFile="php://stdout"/>
|
||||
</report>
|
||||
</coverage>
|
||||
|
||||
<testsuites>
|
||||
<testsuite name="all">
|
||||
<directory>test</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<logging>
|
||||
<junit outputFile="build/report.junit.xml"/>
|
||||
</logging>
|
||||
|
||||
<source>
|
||||
<include>
|
||||
<directory suffix=".php">src</directory>
|
||||
</include>
|
||||
</source>
|
||||
|
||||
<php>
|
||||
<env name="XDEBUG_MODE" value="coverage"/>
|
||||
</php>
|
||||
|
||||
</phpunit>
|
||||
+25
-5
@@ -17,6 +17,7 @@ namespace League\OAuth2\Client\Provider;
|
||||
use GuzzleHttp\Client as HttpClient;
|
||||
use GuzzleHttp\ClientInterface as HttpClientInterface;
|
||||
use GuzzleHttp\Exception\BadResponseException;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use InvalidArgumentException;
|
||||
use League\OAuth2\Client\Grant\AbstractGrant;
|
||||
use League\OAuth2\Client\Grant\GrantFactory;
|
||||
@@ -405,6 +406,7 @@ abstract class AbstractProvider
|
||||
*
|
||||
* @param array $options
|
||||
* @return array Authorization parameters
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
protected function getAuthorizationParameters(array $options)
|
||||
{
|
||||
@@ -476,6 +478,7 @@ abstract class AbstractProvider
|
||||
*
|
||||
* @param array $options
|
||||
* @return string Authorization URL
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
public function getAuthorizationUrl(array $options = [])
|
||||
{
|
||||
@@ -492,10 +495,11 @@ abstract class AbstractProvider
|
||||
* @param array $options
|
||||
* @param callable|null $redirectHandler
|
||||
* @return mixed
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
public function authorize(
|
||||
array $options = [],
|
||||
callable $redirectHandler = null
|
||||
?callable $redirectHandler = null
|
||||
) {
|
||||
$url = $this->getAuthorizationUrl($options);
|
||||
if ($redirectHandler) {
|
||||
@@ -613,13 +617,20 @@ abstract class AbstractProvider
|
||||
*
|
||||
* @param mixed $grant
|
||||
* @param array<string, mixed> $options
|
||||
* @throws IdentityProviderException
|
||||
* @return AccessTokenInterface
|
||||
* @throws IdentityProviderException
|
||||
* @throws UnexpectedValueException
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function getAccessToken($grant, array $options = [])
|
||||
{
|
||||
$grant = $this->verifyGrant($grant);
|
||||
|
||||
if (isset($options['scope']) && is_array($options['scope'])) {
|
||||
$separator = $this->getScopeSeparator();
|
||||
$options['scope'] = implode($separator, $options['scope']);
|
||||
}
|
||||
|
||||
$params = [
|
||||
'client_id' => $this->clientId,
|
||||
'client_secret' => $this->clientSecret,
|
||||
@@ -700,6 +711,7 @@ abstract class AbstractProvider
|
||||
*
|
||||
* @param RequestInterface $request
|
||||
* @return ResponseInterface
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function getResponse(RequestInterface $request)
|
||||
{
|
||||
@@ -710,8 +722,10 @@ abstract class AbstractProvider
|
||||
* Sends a request and returns the parsed response.
|
||||
*
|
||||
* @param RequestInterface $request
|
||||
* @throws IdentityProviderException
|
||||
* @return mixed
|
||||
* @throws IdentityProviderException
|
||||
* @throws UnexpectedValueException
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function getParsedResponse(RequestInterface $request)
|
||||
{
|
||||
@@ -757,7 +771,7 @@ abstract class AbstractProvider
|
||||
*/
|
||||
protected function getContentType(ResponseInterface $response)
|
||||
{
|
||||
return join(';', (array) $response->getHeader('content-type'));
|
||||
return implode(';', $response->getHeader('content-type'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -815,7 +829,7 @@ abstract class AbstractProvider
|
||||
* Custom mapping of expiration, etc should be done here. Always call the
|
||||
* parent method when overloading this method.
|
||||
*
|
||||
* @param mixed $result
|
||||
* @param array<string, mixed> $result
|
||||
* @return array
|
||||
*/
|
||||
protected function prepareAccessTokenResponse(array $result)
|
||||
@@ -859,6 +873,9 @@ abstract class AbstractProvider
|
||||
*
|
||||
* @param AccessToken $token
|
||||
* @return ResourceOwnerInterface
|
||||
* @throws IdentityProviderException
|
||||
* @throws UnexpectedValueException
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function getResourceOwner(AccessToken $token)
|
||||
{
|
||||
@@ -872,6 +889,9 @@ abstract class AbstractProvider
|
||||
*
|
||||
* @param AccessToken $token
|
||||
* @return mixed
|
||||
* @throws IdentityProviderException
|
||||
* @throws UnexpectedValueException
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
protected function fetchResourceOwnerDetails(AccessToken $token)
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ use RuntimeException;
|
||||
*
|
||||
* @link http://tools.ietf.org/html/rfc6749#section-1.4 Access Token (RFC 6749, §1.4)
|
||||
*/
|
||||
class AccessToken implements AccessTokenInterface, ResourceOwnerAccessTokenInterface
|
||||
class AccessToken implements AccessTokenInterface, ResourceOwnerAccessTokenInterface, SettableRefreshTokenInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
@@ -118,7 +118,7 @@ class AccessToken implements AccessTokenInterface, ResourceOwnerAccessTokenInter
|
||||
} elseif (!empty($options['expires'])) {
|
||||
// Some providers supply the seconds until expiration rather than
|
||||
// the exact timestamp. Take a best guess at which we received.
|
||||
$expires = $options['expires'];
|
||||
$expires = (int) $options['expires'];
|
||||
|
||||
if (!$this->isExpirationTimestamp($expires)) {
|
||||
$expires += $this->getTimeNow();
|
||||
@@ -169,6 +169,14 @@ class AccessToken implements AccessTokenInterface, ResourceOwnerAccessTokenInter
|
||||
return $this->refreshToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function setRefreshToken($refreshToken)
|
||||
{
|
||||
$this->refreshToken = $refreshToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
@@ -196,7 +204,7 @@ class AccessToken implements AccessTokenInterface, ResourceOwnerAccessTokenInter
|
||||
throw new RuntimeException('"expires" is not set on the token');
|
||||
}
|
||||
|
||||
return $expires < time();
|
||||
return $expires < $this->getTimeNow();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of the league/oauth2-client library
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @copyright Copyright (c) Alex Bilbie <hello@alexbilbie.com>
|
||||
* @license http://opensource.org/licenses/MIT MIT
|
||||
* @link http://thephpleague.com/oauth2-client/ Documentation
|
||||
* @link https://packagist.org/packages/league/oauth2-client Packagist
|
||||
* @link https://github.com/thephpleague/oauth2-client GitHub
|
||||
*/
|
||||
|
||||
namespace League\OAuth2\Client\Token;
|
||||
|
||||
interface SettableRefreshTokenInterface
|
||||
{
|
||||
/**
|
||||
* Sets or replaces the refresh token with the provided refresh token.
|
||||
*
|
||||
* @param string $refreshToken
|
||||
* @return void
|
||||
*/
|
||||
public function setRefreshToken($refreshToken);
|
||||
}
|
||||
Reference in new issue
Block a user