Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
services
t3o sites
extensions.typo3.org
extensions.typo3.org
Commits
bffa8b47
Commit
bffa8b47
authored
Dec 08, 2021
by
Oliver Bartsch
Browse files
Merge branch 'task/rector-ter-rest' into 'develop'
[TASK] Run rector for v10 support on ter_rest ext See merge request
!695
parents
587f56f8
30dee602
Pipeline
#20784
passed with stages
in 7 minutes and 49 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extensions/ter_rest/Classes/Crypto/EcdsaSignature.php
View file @
bffa8b47
...
...
@@ -13,6 +13,8 @@ declare(strict_types = 1);
namespace
T3o\TerRest\Crypto
;
use
Lcobucci\JWT\Signer
;
use
Lcobucci\JWT\Signer\Ecdsa\Sha512
;
use
Lcobucci\JWT\Signer\Key
;
use
T3o\TerRest\Exception\SignatureKeysMissingException
;
/**
...
...
@@ -25,8 +27,8 @@ use T3o\TerRest\Exception\SignatureKeysMissingException;
final
class
EcdsaSignature
implements
SignatureInterface
{
private
Signer
$signer
;
private
Signer
\
Key
$publicKey
;
private
Signer
\
Key
$privateKey
;
private
Key
$publicKey
;
private
Key
$privateKey
;
public
function
__construct
(
string
$publicKeyFile
=
''
,
string
$privateKeyFile
=
''
,
string
$passphrase
=
''
)
{
...
...
@@ -38,9 +40,9 @@ final class EcdsaSignature implements SignatureInterface
throw
new
SignatureKeysMissingException
(
'Public and private key files are not set.'
,
1603190913
);
}
$this
->
signer
=
new
Signer\Ecdsa\
Sha512
();
$this
->
publicKey
=
new
Signer\
Key
(
'file://'
.
$publicKeyFile
,
$passphrase
);
$this
->
privateKey
=
new
Signer\
Key
(
'file://'
.
$privateKeyFile
,
$passphrase
);
$this
->
signer
=
new
Sha512
();
$this
->
publicKey
=
new
Key
(
'file://'
.
$publicKeyFile
,
$passphrase
);
$this
->
privateKey
=
new
Key
(
'file://'
.
$privateKeyFile
,
$passphrase
);
}
public
function
getIdentifier
():
string
...
...
extensions/ter_rest/Classes/DTO/Download.php
View file @
bffa8b47
...
...
@@ -4,6 +4,7 @@ declare(strict_types = 1);
namespace
T3o\TerRest\DTO
;
use
T3o\TerFe2\Domain\Model\Version
;
/*
* This file is part of TYPO3 CMS-extension "ter_rest", created by Oliver Bartsch.
*
...
...
@@ -24,7 +25,7 @@ class Download implements \JsonSerializable
protected
string
$zip
;
protected
string
$t3x
;
public
function
__construct
(
\
T3o\TerFe2\Domain\Model\
Version
$version
)
public
function
__construct
(
Version
$version
)
{
if
(
$version
->
getReviewState
()
===
-
1
||
$version
->
getExtension
()
===
null
)
{
$this
->
composer
=
$this
->
zip
=
$this
->
t3x
=
''
;
...
...
extensions/ter_rest/Configuration/Services.php
View file @
bffa8b47
...
...
@@ -4,13 +4,7 @@ declare(strict_types = 1);
namespace
T3o\TerRest
;
use
Symfony\Component\DependencyInjection\ContainerBuilder
;
use
Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator
;
use
T3o\TerRest\Authentication\Bearer\Grant\GrantInterface
;
use
T3o\TerRest\Authentication\Provider\AuthenticationProviderInterface
;
use
T3o\TerRest\Crypto\SignatureInterface
;
return
static
function
(
ContainerConfigurator
$configurator
,
ContainerBuilder
$containerBuilder
):
void
{
return
static
function
(
\
Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator
$configurator
,
\
Symfony\Component\DependencyInjection\ContainerBuilder
$containerBuilder
)
:
void
{
$services
=
$configurator
->
services
();
$services
->
defaults
()
...
...
@@ -22,13 +16,13 @@ return static function (ContainerConfigurator $configurator, ContainerBuilder $c
->
load
(
'T3o\\TerRest\\'
,
'../Classes/*'
);
$containerBuilder
->
registerForAutoconfiguration
(
AuthenticationProviderInterface
::
class
)
->
registerForAutoconfiguration
(
\
T3o\TerRest\Authentication\Provider\
AuthenticationProviderInterface
::
class
)
->
addTag
(
't3o.ter_rest_authentification_provider'
);
$containerBuilder
->
registerForAutoconfiguration
(
GrantInterface
::
class
)
->
registerForAutoconfiguration
(
\
T3o\TerRest\Authentication\Bearer\Grant\
GrantInterface
::
class
)
->
addTag
(
't3o.ter_rest_grant_type'
);
$containerBuilder
->
registerForAutoconfiguration
(
SignatureInterface
::
class
)
->
registerForAutoconfiguration
(
\
T3o\TerRest\Crypto\
SignatureInterface
::
class
)
->
addTag
(
't3o.ter_rest_signature'
);
$containerBuilder
->
addCompilerPass
(
new
DependencyInjection\AuthenticationProviderPass
(
't3o.ter_rest_authentification_provider'
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment