@@ -26,7 +26,7 @@ |
||
26 | 26 | private $keys = []; |
27 | 27 | |
28 | 28 | /** |
29 | - * @param JwtKey[] $keys |
|
29 | + * @param \ArrayObject $keys |
|
30 | 30 | */ |
31 | 31 | public function __construct(\ArrayObject $keys) |
32 | 32 | { |
@@ -177,7 +177,7 @@ |
||
177 | 177 | { |
178 | 178 | $authenticator = new Authenticator($this->keys); |
179 | 179 | $request = new Request(); |
180 | - $request->headers->set('Authorization', 'Bearer ' . self::TEST_TOKEN); |
|
180 | + $request->headers->set('Authorization', 'Bearer '.self::TEST_TOKEN); |
|
181 | 181 | $token = $authenticator->createToken($request, 'myprovider'); |
182 | 182 | |
183 | 183 | $expected = ["prn" => "john", 'iss' => 'http://api.server1.com/oauth2/token']; |
@@ -151,7 +151,7 @@ |
||
151 | 151 | if ($this->requiredClaims) { |
152 | 152 | $missing = array_diff_key(array_flip($this->requiredClaims), $claims); |
153 | 153 | if (count($missing)) { |
154 | - throw new \InvalidArgumentException("Missing claims: " . implode(', ', $missing)); |
|
154 | + throw new \InvalidArgumentException("Missing claims: ".implode(', ', $missing)); |
|
155 | 155 | } |
156 | 156 | } |
157 | 157 | if ($this->issuer && !isset($claims['iss'])) { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | public function canGetSecuredContentWitValidPskToken() |
60 | 60 | { |
61 | 61 | $client = $this->createClient(); |
62 | - $server = ['HTTP_AUTHORIZATION' => 'Bearer ' . self::PSK_TOKEN]; |
|
62 | + $server = ['HTTP_AUTHORIZATION' => 'Bearer '.self::PSK_TOKEN]; |
|
63 | 63 | $client->request('GET', '/secured', $parameters = [], $files = [], $server); |
64 | 64 | $this->assertSame('SECURED CONTENT', $client->getResponse()->getContent()); |
65 | 65 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | public function canGetSecuredContentWitValidHmacToken() |
71 | 71 | { |
72 | 72 | $client = $this->createClient(); |
73 | - $server = ['HTTP_AUTHORIZATION' => 'Bearer ' . self::HMAC_TOKEN]; |
|
73 | + $server = ['HTTP_AUTHORIZATION' => 'Bearer '.self::HMAC_TOKEN]; |
|
74 | 74 | $client->request('GET', '/secured', $parameters = [], $files = [], $server); |
75 | 75 | $this->assertSame('SECURED CONTENT', $client->getResponse()->getContent()); |
76 | 76 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | public function canGetSecuredContentWithSecretLoader() |
82 | 82 | { |
83 | 83 | $client = $this->createClient(); |
84 | - $server = ['HTTP_AUTHORIZATION' => 'Bearer ' . self::DYN_HMAC_TOKEN]; |
|
84 | + $server = ['HTTP_AUTHORIZATION' => 'Bearer '.self::DYN_HMAC_TOKEN]; |
|
85 | 85 | $client->request('GET', '/secured-with-secret-loader', $parameters = [], $files = [], $server); |
86 | 86 | $this->assertSame('CONTENT SECURED WITH SECRET LOADER', $client->getResponse()->getContent()); |
87 | 87 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | public function load(array $configs, ContainerBuilder $container) |
27 | 27 | { |
28 | 28 | $config = $this->processConfiguration(new Configuration(), $configs); |
29 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
29 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
30 | 30 | $loader->load('services.yml'); |
31 | 31 | |
32 | 32 | $keysDefinition = new Definition('jwt.keys'); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | foreach ($config['keys'] as $keyId => $keyConfig) { |
36 | 36 | |
37 | 37 | $keyConfig['kid'] = $keyId; |
38 | - $keyDefinition = new Definition('jwt.keys.' . $keyId); |
|
38 | + $keyDefinition = new Definition('jwt.keys.'.$keyId); |
|
39 | 39 | $keyDefinition->setClass('KleijnWeb\JwtBundle\Authenticator\JwtKey'); |
40 | 40 | |
41 | 41 | if (isset($keyConfig['loader'])) { |