diff --git a/master/AbstractServer.php.html b/master/AbstractServer.php.html index 83306695..f7b357a9 100644 --- a/master/AbstractServer.php.html +++ b/master/AbstractServer.php.html @@ -667,8 +667,8 @@
100
     */
101
    public function __construct()
102
    { -
103
        $this->setEventEmitter(); -
104
    } +
103
        $this->setEventEmitter(); +
104
    }
105
106
    /**
107
     * Set an event emitter @@ -677,12 +677,12 @@
110
     */
111
    public function setEventEmitter($emitter = null)
112
    { -
113
        if ($emitter === null) { -
114
            $this->eventEmitter = new Emitter(); -
115
        } else { +
113
        if ($emitter === null) { +
114
            $this->eventEmitter = new Emitter(); +
115
        } else {
116
            $this->eventEmitter = $emitter;
117
        } -
118
    } +
118
    }
119
120
    /**
121
     * Add an event listener to the event emitter @@ -726,11 +726,11 @@
159
     */
160
    public function getRequest()
161
    { -
162
        if ($this->request === null) { -
163
            $this->request = Request::createFromGlobals(); -
164
        } +
162
        if ($this->request === null) { +
163
            $this->request = Request::createFromGlobals(); +
164
        }
165
-
166
        return $this->request; +
166
        return $this->request;
167
    }
168
169
    /** @@ -742,10 +742,10 @@
175
     */
176
    public function setClientStorage(ClientInterface $storage)
177
    { -
178
        $storage->setServer($this); -
179
        $this->clientStorage = $storage; +
178
        $storage->setServer($this); +
179
        $this->clientStorage = $storage;
180
-
181
        return $this; +
181
        return $this;
182
    }
183
184
    /** @@ -757,10 +757,10 @@
190
     */
191
    public function setSessionStorage(SessionInterface $storage)
192
    { -
193
        $storage->setServer($this); -
194
        $this->sessionStorage = $storage; +
193
        $storage->setServer($this); +
194
        $this->sessionStorage = $storage;
195
-
196
        return $this; +
196
        return $this;
197
    }
198
199
    /** @@ -772,10 +772,10 @@
205
     */
206
    public function setAccessTokenStorage(AccessTokenInterface $storage)
207
    { -
208
        $storage->setServer($this); -
209
        $this->accessTokenStorage = $storage; +
208
        $storage->setServer($this); +
209
        $this->accessTokenStorage = $storage;
210
-
211
        return $this; +
211
        return $this;
212
    }
213
214
    /** @@ -787,10 +787,10 @@
220
     */
221
    public function setRefreshTokenStorage(RefreshTokenInterface $storage)
222
    { -
223
        $storage->setServer($this); -
224
        $this->refreshTokenStorage = $storage; +
223
        $storage->setServer($this); +
224
        $this->refreshTokenStorage = $storage;
225
-
226
        return $this; +
226
        return $this;
227
    }
228
229
    /** @@ -817,10 +817,10 @@
250
     */
251
    public function setScopeStorage(ScopeInterface $storage)
252
    { -
253
        $storage->setServer($this); -
254
        $this->scopeStorage = $storage; +
253
        $storage->setServer($this); +
254
        $this->scopeStorage = $storage;
255
-
256
        return $this; +
256
        return $this;
257
    }
258
259
    /** @@ -830,7 +830,7 @@
263
     */
264
    public function getClientStorage()
265
    { -
266
        return $this->clientStorage; +
266
        return $this->clientStorage;
267
    }
268
269
    /** @@ -850,7 +850,7 @@
283
     */
284
    public function getSessionStorage()
285
    { -
286
        return $this->sessionStorage; +
286
        return $this->sessionStorage;
287
    }
288
289
    /** @@ -860,7 +860,7 @@
293
     */
294
    public function getRefreshTokenStorage()
295
    { -
296
        return $this->refreshTokenStorage; +
296
        return $this->refreshTokenStorage;
297
    }
298
299
    /** @@ -870,7 +870,7 @@
303
     */
304
    public function getAccessTokenStorage()
305
    { -
306
        return $this->accessTokenStorage; +
306
        return $this->accessTokenStorage;
307
    }
308
309
    /** @@ -892,9 +892,9 @@
325
     */
326
    public function setTokenType(TokenTypeInterface $tokenType)
327
    { -
328
        $tokenType->setServer($this); -
329
        $this->tokenType = $tokenType; -
330
    } +
328
        $tokenType->setServer($this); +
329
        $this->tokenType = $tokenType; +
330
    }
331
332
    /**
333
     * Get the access token type @@ -903,7 +903,7 @@
336
     */
337
    public function getTokenType()
338
    { -
339
        return $this->tokenType; +
339
        return $this->tokenType;
340
    }
341
342
    /** @@ -934,7 +934,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/AuthorizationServer.php.html b/master/AuthorizationServer.php.html index 67621de5..5bc4f07f 100644 --- a/master/AuthorizationServer.php.html +++ b/master/AuthorizationServer.php.html @@ -66,7 +66,7 @@
100.00%
-
39 / 39
+
38 / 38
@@ -95,7 +95,7 @@
100.00%
-
39 / 39
+
38 / 38
@@ -179,7 +179,7 @@
100.00%
-
2 / 2
+
1 / 1
@@ -518,11 +518,11 @@
77
    public function __construct()
78
    {
79
        // Set Bearer as the default token type -
80
        $this->setTokenType(new Bearer()); +
80
        $this->setTokenType(new Bearer());
81
-
82
        parent::__construct(); +
82
        parent::__construct();
83
-
84
        return $this; +
84
        return $this;
85
    }
86
87
    /** @@ -535,20 +535,20 @@
94
     */
95
    public function addGrantType(GrantTypeInterface $grantType, $identifier = null)
96
    { -
97
        if (is_null($identifier)) { -
98
            $identifier = $grantType->getIdentifier(); -
99
        } +
97
        if (is_null($identifier)) { +
98
            $identifier = $grantType->getIdentifier(); +
99
        }
100
101
        // Inject server into grant -
102
        $grantType->setAuthorizationServer($this); +
102
        $grantType->setAuthorizationServer($this);
103
-
104
        $this->grantTypes[$identifier] = $grantType; +
104
        $this->grantTypes[$identifier] = $grantType;
105
-
106
        if (!is_null($grantType->getResponseType())) { +
106
        if (!is_null($grantType->getResponseType())) {
107
            $this->responseTypes[] = $grantType->getResponseType();
108
        }
109
-
110
        return $this; +
110
        return $this;
111
    }
112
113
    /** @@ -569,8 +569,8 @@
128
     * @return array
129
     */
130
    public function getResponseTypes() -
131
    { -
132
        return $this->responseTypes; +
131
    { +
132
        return $this->responseTypes;
133
    }
134
135
    /** @@ -594,7 +594,7 @@
153
     */
154
    public function scopeParamRequired()
155
    { -
156
        return $this->requireScopeParam; +
156
        return $this->requireScopeParam;
157
    }
158
159
    /** @@ -618,7 +618,7 @@
177
     */
178
    public function getDefaultScope()
179
    { -
180
        return $this->defaultScope; +
180
        return $this->defaultScope;
181
    }
182
183
    /** @@ -652,7 +652,7 @@
211
     */
212
    public function getScopeDelimiter()
213
    { -
214
        return $this->scopeDelimiter; +
214
        return $this->scopeDelimiter;
215
    }
216
217
    /** @@ -676,7 +676,7 @@
235
     */
236
    public function getAccessTokenTTL()
237
    { -
238
        return $this->accessTokenTTL; +
238
        return $this->accessTokenTTL;
239
    }
240
241
    /** @@ -702,18 +702,18 @@
261
     */
262
    public function issueAccessToken()
263
    { -
264
        $grantType = $this->getRequest()->request->get('grant_type'); -
265
        if (is_null($grantType)) { +
264
        $grantType = $this->getRequest()->request->get('grant_type'); +
265
        if (is_null($grantType)) {
266
            throw new Exception\InvalidRequestException('grant_type');
267
        }
268
269
        // Ensure grant type is one that is recognised and is enabled -
270
        if (!in_array($grantType, array_keys($this->grantTypes))) { +
270
        if (!in_array($grantType, array_keys($this->grantTypes))) {
271
            throw new Exception\UnsupportedGrantTypeException($grantType);
272
        }
273
274
        // Complete the flow -
275
        return $this->getGrantType($grantType)->completeFlow(); +
275
        return $this->getGrantType($grantType)->completeFlow();
276
    }
277
278
    /** @@ -727,8 +727,8 @@
286
     */
287
    public function getGrantType($grantType)
288
    { -
289
        if (isset($this->grantTypes[$grantType])) { -
290
            return $this->grantTypes[$grantType]; +
289
        if (isset($this->grantTypes[$grantType])) { +
290
            return $this->grantTypes[$grantType];
291
        }
292
293
        throw new Exception\InvalidGrantException($grantType); @@ -746,7 +746,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Entity/AbstractTokenEntity.php.html b/master/Entity/AbstractTokenEntity.php.html index 911b1eaf..471f274d 100644 --- a/master/Entity/AbstractTokenEntity.php.html +++ b/master/Entity/AbstractTokenEntity.php.html @@ -411,9 +411,9 @@
63
     */
64
    public function __construct(AbstractServer $server)
65
    { -
66
        $this->server = $server; +
66
        $this->server = $server;
67
-
68
        return $this; +
68
        return $this;
69
    }
70
71
    /** @@ -425,9 +425,9 @@
77
     */
78
    public function setSession(SessionEntity $session)
79
    { -
80
        $this->session = $session; +
80
        $this->session = $session;
81
-
82
        return $this; +
82
        return $this;
83
    }
84
85
    /** @@ -439,9 +439,9 @@
91
     */
92
    public function setExpireTime($expireTime)
93
    { -
94
        $this->expireTime = $expireTime; +
94
        $this->expireTime = $expireTime;
95
-
96
        return $this; +
96
        return $this;
97
    }
98
99
    /** @@ -451,7 +451,7 @@
103
     */
104
    public function getExpireTime()
105
    { -
106
        return $this->expireTime; +
106
        return $this->expireTime;
107
    }
108
109
    /** @@ -461,7 +461,7 @@
113
     */
114
    public function isExpired()
115
    { -
116
        return ((time() - $this->expireTime) > 0); +
116
        return ((time() - $this->expireTime) > 0);
117
    }
118
119
    /** @@ -473,9 +473,9 @@
125
     */
126
    public function setId($id = null)
127
    { -
128
        $this->id = ($id !== null) ? $id : SecureKey::generate(); +
128
        $this->id = ($id !== null) ? $id : SecureKey::generate();
129
-
130
        return $this; +
130
        return $this;
131
    }
132
133
    /** @@ -485,7 +485,7 @@
137
     */
138
    public function getId()
139
    { -
140
        return $this->id; +
140
        return $this->id;
141
    }
142
143
    /** @@ -513,18 +513,18 @@
165
     */
166
    protected function formatScopes($unformatted = [])
167
    { -
168
        if (is_null($unformatted)) { +
168
        if (is_null($unformatted)) {
169
            return [];
170
        }
171
-
172
        $scopes = []; -
173
        foreach ($unformatted as $scope) { -
174
            if ($scope instanceof ScopeEntity) { -
175
                $scopes[$scope->getId()] = $scope; -
176
            } -
177
        } +
172
        $scopes = []; +
173
        foreach ($unformatted as $scope) { +
174
            if ($scope instanceof ScopeEntity) { +
175
                $scopes[$scope->getId()] = $scope; +
176
            } +
177
        }
178
-
179
        return $scopes; +
179
        return $scopes;
180
    }
181
182
    /** @@ -567,7 +567,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Entity/AccessTokenEntity.php.html b/master/Entity/AccessTokenEntity.php.html index 273943fc..cd1fa525 100644 --- a/master/Entity/AccessTokenEntity.php.html +++ b/master/Entity/AccessTokenEntity.php.html @@ -234,13 +234,13 @@
23
     */
24
    public function getSession()
25
    { -
26
        if ($this->session instanceof SessionEntity) { -
27
            return $this->session; +
26
        if ($this->session instanceof SessionEntity) { +
27
            return $this->session;
28
        }
29
-
30
        $this->session = $this->server->getSessionStorage()->getByAccessToken($this); +
30
        $this->session = $this->server->getSessionStorage()->getByAccessToken($this);
31
-
32
        return $this->session; +
32
        return $this->session;
33
    }
34
35
    /** @@ -266,13 +266,13 @@
55
     */
56
    public function getScopes()
57
    { -
58
        if ($this->scopes === null) { -
59
            $this->scopes = $this->formatScopes( -
60
                $this->server->getAccessTokenStorage()->getScopes($this) -
61
            ); -
62
        } +
58
        if ($this->scopes === null) { +
59
            $this->scopes = $this->formatScopes( +
60
                $this->server->getAccessTokenStorage()->getScopes($this) +
61
            ); +
62
        }
63
-
64
        return $this->scopes; +
64
        return $this->scopes;
65
    }
66
67
    /** @@ -280,18 +280,18 @@
69
     */
70
    public function save()
71
    { -
72
        $this->server->getAccessTokenStorage()->create( -
73
            $this->getId(), -
74
            $this->getExpireTime(), -
75
            $this->getSession()->getId() -
76
        ); +
72
        $this->server->getAccessTokenStorage()->create( +
73
            $this->getId(), +
74
            $this->getExpireTime(), +
75
            $this->getSession()->getId() +
76
        );
77
78
        // Associate the scope with the token -
79
        foreach ($this->getScopes() as $scope) { -
80
            $this->server->getAccessTokenStorage()->associateScope($this, $scope); -
81
        } +
79
        foreach ($this->getScopes() as $scope) { +
80
            $this->server->getAccessTokenStorage()->associateScope($this, $scope); +
81
        }
82
-
83
        return $this; +
83
        return $this;
84
    }
85
86
    /** @@ -299,8 +299,8 @@
88
     */
89
    public function expire()
90
    { -
91
        $this->server->getAccessTokenStorage()->delete($this); -
92
    } +
91
        $this->server->getAccessTokenStorage()->delete($this); +
92
    }
93
} @@ -314,7 +314,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Entity/AuthCodeEntity.php.html b/master/Entity/AuthCodeEntity.php.html index 2a81e72b..3568a981 100644 --- a/master/Entity/AuthCodeEntity.php.html +++ b/master/Entity/AuthCodeEntity.php.html @@ -391,7 +391,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Entity/ClientEntity.php.html b/master/Entity/ClientEntity.php.html index 5cd4aa01..61760fec 100644 --- a/master/Entity/ClientEntity.php.html +++ b/master/Entity/ClientEntity.php.html @@ -275,9 +275,9 @@
64
     */
65
    public function __construct(AbstractServer $server)
66
    { -
67
        $this->server = $server; +
67
        $this->server = $server;
68
-
69
        return $this; +
69
        return $this;
70
    }
71
72
    /** @@ -332,7 +332,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Entity/EntityTrait.php.html b/master/Entity/EntityTrait.php.html index 1cf3acb0..c7c7b9d2 100644 --- a/master/Entity/EntityTrait.php.html +++ b/master/Entity/EntityTrait.php.html @@ -149,13 +149,13 @@
22
     */
23
    public function hydrate(array $properties)
24
    { -
25
        foreach ($properties as $prop => $val) { -
26
            if (property_exists($this, $prop)) { -
27
                $this->{$prop} = $val; -
28
            } -
29
        } +
25
        foreach ($properties as $prop => $val) { +
26
            if (property_exists($this, $prop)) { +
27
                $this->{$prop} = $val; +
28
            } +
29
        }
30
-
31
        return $this; +
31
        return $this;
32
    }
33
} @@ -170,7 +170,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Entity/RefreshTokenEntity.php.html b/master/Entity/RefreshTokenEntity.php.html index 38656df9..806efbb4 100644 --- a/master/Entity/RefreshTokenEntity.php.html +++ b/master/Entity/RefreshTokenEntity.php.html @@ -264,9 +264,9 @@
53
     */
54
    public function setAccessToken(AccessTokenEntity $accessTokenEntity)
55
    { -
56
        $this->accessTokenEntity = $accessTokenEntity; +
56
        $this->accessTokenEntity = $accessTokenEntity;
57
-
58
        return $this; +
58
        return $this;
59
    }
60
61
    /** @@ -276,11 +276,11 @@
65
     */
66
    public function getAccessToken()
67
    { -
68
        if (! $this->accessTokenEntity instanceof AccessTokenEntity) { -
69
            $this->accessTokenEntity = $this->server->getAccessTokenStorage()->get($this->accessTokenId); -
70
        } +
68
        if (! $this->accessTokenEntity instanceof AccessTokenEntity) { +
69
            $this->accessTokenEntity = $this->server->getAccessTokenStorage()->get($this->accessTokenId); +
70
        }
71
-
72
        return $this->accessTokenEntity; +
72
        return $this->accessTokenEntity;
73
    }
74
75
    /** @@ -288,20 +288,20 @@
77
     */
78
    public function save()
79
    { -
80
        $this->server->getRefreshTokenStorage()->create( -
81
            $this->getId(), -
82
            $this->getExpireTime(), -
83
            $this->getAccessToken()->getId() -
84
        ); -
85
    } +
80
        $this->server->getRefreshTokenStorage()->create( +
81
            $this->getId(), +
82
            $this->getExpireTime(), +
83
            $this->getAccessToken()->getId() +
84
        ); +
85
    }
86
87
    /**
88
     * {@inheritdoc}
89
     */
90
    public function expire()
91
    { -
92
        $this->server->getRefreshTokenStorage()->delete($this); -
93
    } +
92
        $this->server->getRefreshTokenStorage()->delete($this); +
93
    }
94
} @@ -315,7 +315,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Entity/ScopeEntity.php.html b/master/Entity/ScopeEntity.php.html index 1324af27..3098ad8a 100644 --- a/master/Entity/ScopeEntity.php.html +++ b/master/Entity/ScopeEntity.php.html @@ -240,9 +240,9 @@
50
     */
51
    public function __construct(AbstractServer $server)
52
    { -
53
        $this->server = $server; +
53
        $this->server = $server;
54
-
55
        return $this; +
55
        return $this;
56
    }
57
58
    /** @@ -252,7 +252,7 @@
62
     */
63
    public function getId()
64
    { -
65
        return $this->id; +
65
        return $this->id;
66
    }
67
68
    /** @@ -290,7 +290,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Entity/SessionEntity.php.html b/master/Entity/SessionEntity.php.html index 0d5666c7..51904725 100644 --- a/master/Entity/SessionEntity.php.html +++ b/master/Entity/SessionEntity.php.html @@ -512,9 +512,9 @@
91
     */
92
    public function __construct(AbstractServer $server)
93
    { -
94
        $this->server = $server; +
94
        $this->server = $server;
95
-
96
        return $this; +
96
        return $this;
97
    }
98
99
    /** @@ -538,7 +538,7 @@
117
     */
118
    public function getId()
119
    { -
120
        return $this->id; +
120
        return $this->id;
121
    }
122
123
    /** @@ -580,11 +580,11 @@
159
     */
160
    public function getScopes()
161
    { -
162
        if ($this->scopes === null) { -
163
            $this->scopes = $this->formatScopes($this->server->getSessionStorage()->getScopes($this)); -
164
        } +
162
        if ($this->scopes === null) { +
163
            $this->scopes = $this->formatScopes($this->server->getSessionStorage()->getScopes($this)); +
164
        }
165
-
166
        return $this->scopes; +
166
        return $this->scopes;
167
    }
168
169
    /** @@ -596,8 +596,8 @@
175
     */
176
    private function formatScopes($unformatted = [])
177
    { -
178
        $scopes = []; -
179
        if (is_array($unformatted)) { +
178
        $scopes = []; +
179
        if (is_array($unformatted)) {
180
            foreach ($unformatted as $scope) {
181
                if ($scope instanceof ScopeEntity) {
182
                    $scopes[$scope->getId()] = $scope; @@ -605,7 +605,7 @@
184
            }
185
        }
186
-
187
        return $scopes; +
187
        return $scopes;
188
    }
189
190
    /** @@ -739,7 +739,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Entity/dashboard.html b/master/Entity/dashboard.html index a6473d83..9055b937 100644 --- a/master/Entity/dashboard.html +++ b/master/Entity/dashboard.html @@ -143,7 +143,7 @@ diff --git a/master/Entity/index.html b/master/Entity/index.html index 499ea148..ddb4725a 100644 --- a/master/Entity/index.html +++ b/master/Entity/index.html @@ -305,7 +305,7 @@ High: 90% to 100%

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Event/ClientAuthenticationFailedEvent.php.html b/master/Event/ClientAuthenticationFailedEvent.php.html index f8772913..516b4e52 100644 --- a/master/Event/ClientAuthenticationFailedEvent.php.html +++ b/master/Event/ClientAuthenticationFailedEvent.php.html @@ -234,7 +234,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Event/SessionOwnerEvent.php.html b/master/Event/SessionOwnerEvent.php.html index b9bbddcd..6f42284b 100644 --- a/master/Event/SessionOwnerEvent.php.html +++ b/master/Event/SessionOwnerEvent.php.html @@ -234,7 +234,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Event/UserAuthenticationFailedEvent.php.html b/master/Event/UserAuthenticationFailedEvent.php.html index f2a21c28..0975f29e 100644 --- a/master/Event/UserAuthenticationFailedEvent.php.html +++ b/master/Event/UserAuthenticationFailedEvent.php.html @@ -234,7 +234,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Event/dashboard.html b/master/Event/dashboard.html index 3a1dddce..d145b49e 100644 --- a/master/Event/dashboard.html +++ b/master/Event/dashboard.html @@ -141,7 +141,7 @@ diff --git a/master/Event/index.html b/master/Event/index.html index 8d95f073..dcfb9116 100644 --- a/master/Event/index.html +++ b/master/Event/index.html @@ -165,7 +165,7 @@ High: 90% to 100%

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Exception/AccessDeniedException.php.html b/master/Exception/AccessDeniedException.php.html index ece323b3..28792103 100644 --- a/master/Exception/AccessDeniedException.php.html +++ b/master/Exception/AccessDeniedException.php.html @@ -173,7 +173,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Exception/InvalidClientException.php.html b/master/Exception/InvalidClientException.php.html index 9eb91567..3bf36822 100644 --- a/master/Exception/InvalidClientException.php.html +++ b/master/Exception/InvalidClientException.php.html @@ -173,7 +173,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Exception/InvalidCredentialsException.php.html b/master/Exception/InvalidCredentialsException.php.html index 97c7d5c8..db488c18 100644 --- a/master/Exception/InvalidCredentialsException.php.html +++ b/master/Exception/InvalidCredentialsException.php.html @@ -173,7 +173,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Exception/InvalidGrantException.php.html b/master/Exception/InvalidGrantException.php.html index 8f34d5bd..4e3aeea5 100644 --- a/master/Exception/InvalidGrantException.php.html +++ b/master/Exception/InvalidGrantException.php.html @@ -179,7 +179,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Exception/InvalidRefreshException.php.html b/master/Exception/InvalidRefreshException.php.html index 9e6176f7..e13b4cd1 100644 --- a/master/Exception/InvalidRefreshException.php.html +++ b/master/Exception/InvalidRefreshException.php.html @@ -173,7 +173,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Exception/InvalidRequestException.php.html b/master/Exception/InvalidRequestException.php.html index f6fe67cd..caf293ab 100644 --- a/master/Exception/InvalidRequestException.php.html +++ b/master/Exception/InvalidRequestException.php.html @@ -181,7 +181,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Exception/InvalidScopeException.php.html b/master/Exception/InvalidScopeException.php.html index 9740fcb5..c8cf9b0a 100644 --- a/master/Exception/InvalidScopeException.php.html +++ b/master/Exception/InvalidScopeException.php.html @@ -181,7 +181,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Exception/OAuthException.php.html b/master/Exception/OAuthException.php.html index 2381e40d..7e167322 100644 --- a/master/Exception/OAuthException.php.html +++ b/master/Exception/OAuthException.php.html @@ -330,7 +330,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Exception/ServerErrorException.php.html b/master/Exception/ServerErrorException.php.html index 244559c9..3ce0c925 100644 --- a/master/Exception/ServerErrorException.php.html +++ b/master/Exception/ServerErrorException.php.html @@ -174,7 +174,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Exception/UnauthorizedClientException.php.html b/master/Exception/UnauthorizedClientException.php.html index 57d0cd75..8bddda6b 100644 --- a/master/Exception/UnauthorizedClientException.php.html +++ b/master/Exception/UnauthorizedClientException.php.html @@ -173,7 +173,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Exception/UnsupportedGrantTypeException.php.html b/master/Exception/UnsupportedGrantTypeException.php.html index 580ea46f..befbedf0 100644 --- a/master/Exception/UnsupportedGrantTypeException.php.html +++ b/master/Exception/UnsupportedGrantTypeException.php.html @@ -179,7 +179,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Exception/UnsupportedResponseTypeException.php.html b/master/Exception/UnsupportedResponseTypeException.php.html index faa399d8..01a7621a 100644 --- a/master/Exception/UnsupportedResponseTypeException.php.html +++ b/master/Exception/UnsupportedResponseTypeException.php.html @@ -174,7 +174,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Exception/dashboard.html b/master/Exception/dashboard.html index c411bcaf..0b44042e 100644 --- a/master/Exception/dashboard.html +++ b/master/Exception/dashboard.html @@ -137,7 +137,7 @@ diff --git a/master/Exception/index.html b/master/Exception/index.html index 9f89d4a9..e6c3bb9b 100644 --- a/master/Exception/index.html +++ b/master/Exception/index.html @@ -417,7 +417,7 @@ High: 90% to 100%

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Grant/AbstractGrant.php.html b/master/Grant/AbstractGrant.php.html index 6886fa92..c869f6ea 100644 --- a/master/Grant/AbstractGrant.php.html +++ b/master/Grant/AbstractGrant.php.html @@ -335,7 +335,7 @@
61
     */
62
    public function getIdentifier()
63
    { -
64
        return $this->identifier; +
64
        return $this->identifier;
65
    }
66
67
    /** @@ -353,7 +353,7 @@
79
     */
80
    public function getResponseType()
81
    { -
82
        return $this->responseType; +
82
        return $this->responseType;
83
    }
84
85
    /** @@ -363,11 +363,11 @@
89
     */
90
    public function getAccessTokenTTL()
91
    { -
92
        if ($this->accessTokenTTL) { +
92
        if ($this->accessTokenTTL) {
93
            return $this->accessTokenTTL;
94
        }
95
-
96
        return $this->server->getAccessTokenTTL(); +
96
        return $this->server->getAccessTokenTTL();
97
    }
98
99
    /** @@ -389,9 +389,9 @@
115
     */
116
    public function setAuthorizationServer(AuthorizationServer $server)
117
    { -
118
        $this->server = $server; +
118
        $this->server = $server;
119
-
120
        return $this; +
120
        return $this;
121
    }
122
123
    /** @@ -408,22 +408,22 @@
134
     */
135
    public function validateScopes($scopeParam = '', ClientEntity $client, $redirectUri = null)
136
    { -
137
        $scopesList = explode($this->server->getScopeDelimiter(), $scopeParam); +
137
        $scopesList = explode($this->server->getScopeDelimiter(), $scopeParam);
138
-
139
        for ($i = 0; $i < count($scopesList); $i++) { -
140
            $scopesList[$i] = trim($scopesList[$i]); -
141
            if ($scopesList[$i] === '') { -
142
                unset($scopesList[$i]); // Remove any junk scopes -
143
            } -
144
        } +
139
        for ($i = 0; $i < count($scopesList); $i++) { +
140
            $scopesList[$i] = trim($scopesList[$i]); +
141
            if ($scopesList[$i] === '') { +
142
                unset($scopesList[$i]); // Remove any junk scopes +
143
            } +
144
        }
145
146
        if ( -
147
            $this->server->scopeParamRequired() === true -
148
            && $this->server->getDefaultScope() === null -
149
            && count($scopesList) === 0 -
150
        ) { +
147
            $this->server->scopeParamRequired() === true +
148
            && $this->server->getDefaultScope() === null +
149
            && count($scopesList) === 0 +
150
        ) {
151
            throw new Exception\InvalidRequestException('scope'); -
152
        } elseif (count($scopesList) === 0 && $this->server->getDefaultScope() !== null) { +
152
        } elseif (count($scopesList) === 0 && $this->server->getDefaultScope() !== null) {
153
            if (is_array($this->server->getDefaultScope())) {
154
                $scopesList = $this->server->getDefaultScope();
155
            } else { @@ -431,9 +431,9 @@
157
            }
158
        }
159
-
160
        $scopes = []; +
160
        $scopes = [];
161
-
162
        foreach ($scopesList as $scopeItem) { +
162
        foreach ($scopesList as $scopeItem) {
163
            $scope = $this->server->getScopeStorage()->get(
164
                $scopeItem,
165
                $this->getIdentifier(), @@ -445,9 +445,9 @@
171
            }
172
173
            $scopes[$scope->getId()] = $scope; -
174
        } +
174
        }
175
-
176
        return $scopes; +
176
        return $scopes;
177
    }
178
179
    /** @@ -459,14 +459,14 @@
185
     */
186
    protected function formatScopes($unformated = [])
187
    { -
188
        $scopes = []; -
189
        foreach ($unformated as $scope) { +
188
        $scopes = []; +
189
        foreach ($unformated as $scope) {
190
            if ($scope instanceof ScopeEntity) {
191
                $scopes[$scope->getId()] = $scope;
192
            } -
193
        } +
193
        }
194
-
195
        return $scopes; +
195
        return $scopes;
196
    }
197
} @@ -481,7 +481,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Grant/AuthCodeGrant.php.html b/master/Grant/AuthCodeGrant.php.html index 65419f6a..ce7b0193 100644 --- a/master/Grant/AuthCodeGrant.php.html +++ b/master/Grant/AuthCodeGrant.php.html @@ -473,7 +473,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Grant/ClientCredentialsGrant.php.html b/master/Grant/ClientCredentialsGrant.php.html index 37c83937..29fa7dd8 100644 --- a/master/Grant/ClientCredentialsGrant.php.html +++ b/master/Grant/ClientCredentialsGrant.php.html @@ -259,7 +259,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Grant/GrantTypeInterface.php.html b/master/Grant/GrantTypeInterface.php.html index 7ccf9a1a..b9757dad 100644 --- a/master/Grant/GrantTypeInterface.php.html +++ b/master/Grant/GrantTypeInterface.php.html @@ -131,7 +131,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Grant/PasswordGrant.php.html b/master/Grant/PasswordGrant.php.html index d0b7c6cf..6e383678 100644 --- a/master/Grant/PasswordGrant.php.html +++ b/master/Grant/PasswordGrant.php.html @@ -361,7 +361,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Grant/RefreshTokenGrant.php.html b/master/Grant/RefreshTokenGrant.php.html index e2f82440..c423bc61 100644 --- a/master/Grant/RefreshTokenGrant.php.html +++ b/master/Grant/RefreshTokenGrant.php.html @@ -58,7 +58,7 @@
100.00%
-
3 / 3
+
5 / 5
CRAP
@@ -67,7 +67,7 @@
100.00%
-
60 / 60
+
66 / 66
@@ -87,8 +87,8 @@
100.00%
-
3 / 3
- 13 +
5 / 5
+ 16
100.00% covered (success) @@ -96,11 +96,11 @@
100.00%
-
60 / 60
+
66 / 66
-  setRefreshTokenTTL($refreshTokenTTL) +  setRefreshTokenTTL($refreshTokenTTL)
100.00% covered (success) @@ -121,7 +121,7 @@ -  getRefreshTokenTTL() +  getRefreshTokenTTL()
100.00% covered (success) @@ -142,7 +142,7 @@ -  completeFlow() +  setRefreshTokenRotation($refreshTokenRotate = true)
100.00% covered (success) @@ -151,7 +151,7 @@
100.00%
1 / 1
- 11 + 1
100.00% covered (success) @@ -159,7 +159,49 @@
100.00%
-
57 / 57
+
2 / 2
+ + + +  shouldRotateRefreshTokens() +
+
+ 100.00% covered (success) +
+
+ +
100.00%
+
1 / 1
+ 1 +
+
+ 100.00% covered (success) +
+
+ +
100.00%
+
1 / 1
+ + + +  completeFlow() +
+
+ 100.00% covered (success) +
+
+ +
100.00%
+
1 / 1
+ 12 +
+
+ 100.00% covered (success) +
+
+ +
100.00%
+
60 / 60
@@ -205,131 +247,161 @@     protected $refreshTokenTTL = 604800;     /** -      * Set the TTL of the refresh token +      * Rotate token (default = true)      * -      * @param int $refreshTokenTTL -      * -      * @return void -      */ -     public function setRefreshTokenTTL($refreshTokenTTL) -     { -         $this->refreshTokenTTL = $refreshTokenTTL; -     } - -     /** -      * Get the TTL of the refresh token -      * -      * @return int -      */ -     public function getRefreshTokenTTL() -     { -         return $this->refreshTokenTTL; -     } - -     /** -      * {@inheritdoc} -      */ -     public function completeFlow() -     { -         $clientId = $this->server->getRequest()->request->get('client_id', $this->server->getRequest()->getUser()); -         if (is_null($clientId)) { -             throw new Exception\InvalidRequestException('client_id'); -         } - -         $clientSecret = $this->server->getRequest()->request->get('client_secret', -             $this->server->getRequest()->getPassword()); -         if (is_null($clientSecret)) { -             throw new Exception\InvalidRequestException('client_secret'); -         } +      * @var integer +      */ +     protected $refreshTokenRotate = true; + +     /** +      * Set the TTL of the refresh token +      * +      * @param int $refreshTokenTTL +      * +      * @return void +      */ +     public function setRefreshTokenTTL($refreshTokenTTL) +     { +         $this->refreshTokenTTL = $refreshTokenTTL; +     } + +     /** +      * Get the TTL of the refresh token +      * +      * @return int +      */ +     public function getRefreshTokenTTL() +     { +         return $this->refreshTokenTTL; +     } + +     /** +      * Set the rotation boolean of the refresh token +      * @param bool $refreshTokenRotate +      */ +     public function setRefreshTokenRotation($refreshTokenRotate = true) +     { +         $this->refreshTokenRotate = $refreshTokenRotate; +     } -         // Validate client ID and client secret -         $client = $this->server->getClientStorage()->get( -             $clientId, -             $clientSecret, -             null, -             $this->getIdentifier() -         ); - -         if (($client instanceof ClientEntity) === false) { -             $this->server->getEventEmitter()->emit(new Event\ClientAuthenticationFailedEvent($this->server->getRequest())); -             throw new Exception\InvalidClientException(); -         } - -         $oldRefreshTokenParam = $this->server->getRequest()->request->get('refresh_token', null); -         if ($oldRefreshTokenParam === null) { -             throw new Exception\InvalidRequestException('refresh_token'); -         } - -         // Validate refresh token -         $oldRefreshToken = $this->server->getRefreshTokenStorage()->get($oldRefreshTokenParam); - -         if (($oldRefreshToken instanceof RefreshTokenEntity) === false) { -             throw new Exception\InvalidRefreshException(); -         } - -         // Ensure the old refresh token hasn't expired -         if ($oldRefreshToken->isExpired() === true) { -             throw new Exception\InvalidRefreshException(); -         } - -         $oldAccessToken = $oldRefreshToken->getAccessToken(); - -         // Get the scopes for the original session -         $session = $oldAccessToken->getSession(); -         $scopes = $this->formatScopes($session->getScopes()); - -         // Get and validate any requested scopes -         $requestedScopesString = $this->server->getRequest()->request->get('scope', ''); -         $requestedScopes = $this->validateScopes($requestedScopesString, $client); - -         // If no new scopes are requested then give the access token the original session scopes -         if (count($requestedScopes) === 0) { -             $newScopes = $scopes; -         } else { -             // The OAuth spec says that a refreshed access token can have the original scopes or fewer so ensure -             //  the request doesn't include any new scopes -             foreach ($requestedScopes as $requestedScope) { -                 if (!isset($scopes[$requestedScope->getId()])) { -                     throw new Exception\InvalidScopeException($requestedScope->getId()); -                 } -             } - -             $newScopes = $requestedScopes; -         } - -         // Generate a new access token and assign it the correct sessions -         $newAccessToken = new AccessTokenEntity($this->server); -         $newAccessToken->setId(SecureKey::generate()); -         $newAccessToken->setExpireTime($this->getAccessTokenTTL() + time()); -         $newAccessToken->setSession($session); - -         foreach ($newScopes as $newScope) { -             $newAccessToken->associateScope($newScope); -         } - -         // Expire the old token and save the new one -         $oldAccessToken->expire(); -         $newAccessToken->save(); - -         $this->server->getTokenType()->setSession($session); -         $this->server->getTokenType()->setParam('access_token', $newAccessToken->getId()); -         $this->server->getTokenType()->setParam('expires_in', $this->getAccessTokenTTL()); - -         // Expire the old refresh token -         $oldRefreshToken->expire(); - -         // Generate a new refresh token -         $newRefreshToken = new RefreshTokenEntity($this->server); -         $newRefreshToken->setId(SecureKey::generate()); -         $newRefreshToken->setExpireTime($this->getRefreshTokenTTL() + time()); -         $newRefreshToken->setAccessToken($newAccessToken); -         $newRefreshToken->save(); - -         $this->server->getTokenType()->setParam('refresh_token', $newRefreshToken->getId()); - -         return $this->server->getTokenType()->generateResponse(); -     } - } +     /** +      * Get rotation boolean of the refresh token +      * +      * @return bool +      */ +     public function shouldRotateRefreshTokens() +     { +         return $this->refreshTokenRotate; +     } + +     /** +      * {@inheritdoc} +      */ +     public function completeFlow() +     { +         $clientId = $this->server->getRequest()->request->get('client_id', $this->server->getRequest()->getUser()); +         if (is_null($clientId)) { +             throw new Exception\InvalidRequestException('client_id'); +         } + +         $clientSecret = $this->server->getRequest()->request->get('client_secret', +             $this->server->getRequest()->getPassword()); +         if (is_null($clientSecret)) { +             throw new Exception\InvalidRequestException('client_secret'); +         } + +         // Validate client ID and client secret +         $client = $this->server->getClientStorage()->get( +             $clientId, +             $clientSecret, +             null, +             $this->getIdentifier() +         ); + +         if (($client instanceof ClientEntity) === false) { +             $this->server->getEventEmitter()->emit(new Event\ClientAuthenticationFailedEvent($this->server->getRequest())); +             throw new Exception\InvalidClientException(); +         } + +         $oldRefreshTokenParam = $this->server->getRequest()->request->get('refresh_token', null); +         if ($oldRefreshTokenParam === null) { +             throw new Exception\InvalidRequestException('refresh_token'); +         } + +         // Validate refresh token +         $oldRefreshToken = $this->server->getRefreshTokenStorage()->get($oldRefreshTokenParam); + +         if (($oldRefreshToken instanceof RefreshTokenEntity) === false) { +             throw new Exception\InvalidRefreshException(); +         } + +         // Ensure the old refresh token hasn't expired +         if ($oldRefreshToken->isExpired() === true) { +             throw new Exception\InvalidRefreshException(); +         } + +         $oldAccessToken = $oldRefreshToken->getAccessToken(); + +         // Get the scopes for the original session +         $session = $oldAccessToken->getSession(); +         $scopes = $this->formatScopes($session->getScopes()); + +         // Get and validate any requested scopes +         $requestedScopesString = $this->server->getRequest()->request->get('scope', ''); +         $requestedScopes = $this->validateScopes($requestedScopesString, $client); + +         // If no new scopes are requested then give the access token the original session scopes +         if (count($requestedScopes) === 0) { +             $newScopes = $scopes; +         } else { +             // The OAuth spec says that a refreshed access token can have the original scopes or fewer so ensure +             //  the request doesn't include any new scopes +             foreach ($requestedScopes as $requestedScope) { +                 if (!isset($scopes[$requestedScope->getId()])) { +                     throw new Exception\InvalidScopeException($requestedScope->getId()); +                 } +             } + +             $newScopes = $requestedScopes; +         } + +         // Generate a new access token and assign it the correct sessions +         $newAccessToken = new AccessTokenEntity($this->server); +         $newAccessToken->setId(SecureKey::generate()); +         $newAccessToken->setExpireTime($this->getAccessTokenTTL() + time()); +         $newAccessToken->setSession($session); + +         foreach ($newScopes as $newScope) { +             $newAccessToken->associateScope($newScope); +         } + +         // Expire the old token and save the new one +         $oldAccessToken->expire(); +         $newAccessToken->save(); + +         $this->server->getTokenType()->setSession($session); +         $this->server->getTokenType()->setParam('access_token', $newAccessToken->getId()); +         $this->server->getTokenType()->setParam('expires_in', $this->getAccessTokenTTL()); + +         if ($this->shouldRotateRefreshTokens()) { +             // Expire the old refresh token +             $oldRefreshToken->expire(); + +             // Generate a new refresh token +             $newRefreshToken = new RefreshTokenEntity($this->server); +             $newRefreshToken->setId(SecureKey::generate()); +             $newRefreshToken->setExpireTime($this->getRefreshTokenTTL() + time()); +             $newRefreshToken->setAccessToken($newAccessToken); +             $newRefreshToken->save(); + +             $this->server->getTokenType()->setParam('refresh_token', $newRefreshToken->getId()); +         } else { +             $this->server->getTokenType()->setParam('refresh_token', $oldRefreshToken->getId()); +         } + +         return $this->server->getTokenType()->generateResponse(); +     } + } @@ -342,7 +414,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Grant/dashboard.html b/master/Grant/dashboard.html index afa7d1e9..33762236 100644 --- a/master/Grant/dashboard.html +++ b/master/Grant/dashboard.html @@ -137,7 +137,7 @@
@@ -176,7 +176,7 @@ $(document).ready(function() { .yAxis.tickFormat(d3.format('d')); d3.select('#methodCoverageDistribution svg') - .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,0,0,19], "Method Coverage")) + .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,0,0,21], "Method Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -227,7 +227,7 @@ $(document).ready(function() { chart.yAxis.axisLabel('Cyclomatic Complexity'); d3.select('#classComplexity svg') - .datum(getComplexityData([[100,21,"AbstractGrant<\/a>"],[100,25,"AuthCodeGrant<\/a>"],[100,6,"ClientCredentialsGrant<\/a>"],[100,15,"PasswordGrant<\/a>"],[100,13,"RefreshTokenGrant<\/a>"]], 'Class Complexity')) + .datum(getComplexityData([[100,21,"AbstractGrant<\/a>"],[100,25,"AuthCodeGrant<\/a>"],[100,6,"ClientCredentialsGrant<\/a>"],[100,15,"PasswordGrant<\/a>"],[100,16,"RefreshTokenGrant<\/a>"]], 'Class Complexity')) .transition() .duration(500) .call(chart); @@ -252,7 +252,7 @@ $(document).ready(function() { chart.yAxis.axisLabel('Method Complexity'); d3.select('#methodComplexity svg') - .datum(getComplexityData([[100,1,"AbstractGrant::getIdentifier<\/a>"],[100,1,"AbstractGrant::setIdentifier<\/a>"],[100,1,"AbstractGrant::getResponseType<\/a>"],[100,2,"AbstractGrant::getAccessTokenTTL<\/a>"],[100,1,"AbstractGrant::setAccessTokenTTL<\/a>"],[100,1,"AbstractGrant::setAuthorizationServer<\/a>"],[100,11,"AbstractGrant::validateScopes<\/a>"],[100,3,"AbstractGrant::formatScopes<\/a>"],[100,1,"AuthCodeGrant::setAuthTokenTTL<\/a>"],[100,8,"AuthCodeGrant::checkAuthorizeParams<\/a>"],[100,2,"AuthCodeGrant::newAuthorizeRequest<\/a>"],[100,14,"AuthCodeGrant::completeFlow<\/a>"],[100,6,"ClientCredentialsGrant::completeFlow<\/a>"],[100,1,"PasswordGrant::setVerifyCredentialsCallback<\/a>"],[100,3,"PasswordGrant::getVerifyCredentialsCallback<\/a>"],[100,11,"PasswordGrant::completeFlow<\/a>"],[100,1,"RefreshTokenGrant::setRefreshTokenTTL<\/a>"],[100,1,"RefreshTokenGrant::getRefreshTokenTTL<\/a>"],[100,11,"RefreshTokenGrant::completeFlow<\/a>"]], 'Method Complexity')) + .datum(getComplexityData([[100,1,"AbstractGrant::getIdentifier<\/a>"],[100,1,"AbstractGrant::setIdentifier<\/a>"],[100,1,"AbstractGrant::getResponseType<\/a>"],[100,2,"AbstractGrant::getAccessTokenTTL<\/a>"],[100,1,"AbstractGrant::setAccessTokenTTL<\/a>"],[100,1,"AbstractGrant::setAuthorizationServer<\/a>"],[100,11,"AbstractGrant::validateScopes<\/a>"],[100,3,"AbstractGrant::formatScopes<\/a>"],[100,1,"AuthCodeGrant::setAuthTokenTTL<\/a>"],[100,8,"AuthCodeGrant::checkAuthorizeParams<\/a>"],[100,2,"AuthCodeGrant::newAuthorizeRequest<\/a>"],[100,14,"AuthCodeGrant::completeFlow<\/a>"],[100,6,"ClientCredentialsGrant::completeFlow<\/a>"],[100,1,"PasswordGrant::setVerifyCredentialsCallback<\/a>"],[100,3,"PasswordGrant::getVerifyCredentialsCallback<\/a>"],[100,11,"PasswordGrant::completeFlow<\/a>"],[100,1,"RefreshTokenGrant::setRefreshTokenTTL<\/a>"],[100,1,"RefreshTokenGrant::getRefreshTokenTTL<\/a>"],[100,1,"RefreshTokenGrant::setRefreshTokenRotation<\/a>"],[100,1,"RefreshTokenGrant::shouldRotateRefreshTokens<\/a>"],[100,12,"RefreshTokenGrant::completeFlow<\/a>"]], 'Method Complexity')) .transition() .duration(500) .call(chart); diff --git a/master/Grant/index.html b/master/Grant/index.html index 9e2ea254..23886724 100644 --- a/master/Grant/index.html +++ b/master/Grant/index.html @@ -50,7 +50,7 @@
100.00%
-
311 / 311
+
317 / 317
100.00% covered (success) @@ -58,7 +58,7 @@
100.00%
-
19 / 19
+
21 / 21
100.00% covered (success) @@ -203,7 +203,7 @@
100.00%
-
60 / 60
+
66 / 66
100.00% covered (success) @@ -211,7 +211,7 @@
100.00%
-
3 / 3
+
5 / 5
diff --git a/master/ResourceServer.php.html b/master/ResourceServer.php.html index 54e995d9..1576ac77 100644 --- a/master/ResourceServer.php.html +++ b/master/ResourceServer.php.html @@ -376,7 +376,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Storage/AbstractStorage.php.html b/master/Storage/AbstractStorage.php.html index 30aa8674..e94f75bb 100644 --- a/master/Storage/AbstractStorage.php.html +++ b/master/Storage/AbstractStorage.php.html @@ -209,7 +209,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Storage/AccessTokenInterface.php.html b/master/Storage/AccessTokenInterface.php.html index 356b9e56..0e019aaf 100644 --- a/master/Storage/AccessTokenInterface.php.html +++ b/master/Storage/AccessTokenInterface.php.html @@ -141,7 +141,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Storage/AuthCodeInterface.php.html b/master/Storage/AuthCodeInterface.php.html index df216913..f2ec7a1c 100644 --- a/master/Storage/AuthCodeInterface.php.html +++ b/master/Storage/AuthCodeInterface.php.html @@ -142,7 +142,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Storage/ClientInterface.php.html b/master/Storage/ClientInterface.php.html index abc916a2..65d7011d 100644 --- a/master/Storage/ClientInterface.php.html +++ b/master/Storage/ClientInterface.php.html @@ -113,7 +113,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Storage/MacTokenInterface.php.html b/master/Storage/MacTokenInterface.php.html index 3a25ec2b..3d44c682 100644 --- a/master/Storage/MacTokenInterface.php.html +++ b/master/Storage/MacTokenInterface.php.html @@ -106,7 +106,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Storage/RefreshTokenInterface.php.html b/master/Storage/RefreshTokenInterface.php.html index 109c2965..1159893d 100644 --- a/master/Storage/RefreshTokenInterface.php.html +++ b/master/Storage/RefreshTokenInterface.php.html @@ -121,7 +121,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Storage/ScopeInterface.php.html b/master/Storage/ScopeInterface.php.html index e94d1dce..a08be1a3 100644 --- a/master/Storage/ScopeInterface.php.html +++ b/master/Storage/ScopeInterface.php.html @@ -101,7 +101,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Storage/SessionInterface.php.html b/master/Storage/SessionInterface.php.html index d19f3809..8e57fb55 100644 --- a/master/Storage/SessionInterface.php.html +++ b/master/Storage/SessionInterface.php.html @@ -144,7 +144,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Storage/StorageInterface.php.html b/master/Storage/StorageInterface.php.html index 6de091fb..3d121308 100644 --- a/master/Storage/StorageInterface.php.html +++ b/master/Storage/StorageInterface.php.html @@ -99,7 +99,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Storage/dashboard.html b/master/Storage/dashboard.html index 7435849a..3ecbf474 100644 --- a/master/Storage/dashboard.html +++ b/master/Storage/dashboard.html @@ -137,7 +137,7 @@
diff --git a/master/Storage/index.html b/master/Storage/index.html index dea564da..5a0ef6fc 100644 --- a/master/Storage/index.html +++ b/master/Storage/index.html @@ -213,7 +213,7 @@ High: 90% to 100%

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/TokenType/AbstractTokenType.php.html b/master/TokenType/AbstractTokenType.php.html index 04847536..137d6056 100644 --- a/master/TokenType/AbstractTokenType.php.html +++ b/master/TokenType/AbstractTokenType.php.html @@ -232,9 +232,9 @@      */     public function setServer(AbstractServer $server)     { -         $this->server = $server; +         $this->server = $server; -         return $this; +         return $this;     }     /** @@ -242,9 +242,9 @@      */     public function setSession(SessionEntity $session)     { -         $this->session = $session; +         $this->session = $session; -         return $this; +         return $this;     }     /** @@ -252,15 +252,15 @@      */     public function setParam($key, $value)     { -         $this->response[$key] = $value; -     } +         $this->response[$key] = $value; +     }     /**      * {@inheritdoc}      */     public function getParam($key)     { -         return isset($this->response[$key]) ? $this->response[$key] : null; +         return isset($this->response[$key]) ? $this->response[$key] : null;     } } @@ -275,7 +275,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/TokenType/Bearer.php.html b/master/TokenType/Bearer.php.html index 76ce7210..7736191b 100644 --- a/master/TokenType/Bearer.php.html +++ b/master/TokenType/Bearer.php.html @@ -169,16 +169,16 @@     public function generateResponse()     {         $return = [ -             'access_token'  =>  $this->getParam('access_token'), -             'token_type'    =>  'Bearer', -             'expires_in'    =>  $this->getParam('expires_in'), -         ]; +             'access_token'  =>  $this->getParam('access_token'), +             'token_type'    =>  'Bearer', +             'expires_in'    =>  $this->getParam('expires_in'), +         ]; -         if (!is_null($this->getParam('refresh_token'))) { -             $return['refresh_token'] = $this->getParam('refresh_token'); -         } +         if (!is_null($this->getParam('refresh_token'))) { +             $return['refresh_token'] = $this->getParam('refresh_token'); +         } -         return $return; +         return $return;     }     /** @@ -204,7 +204,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/TokenType/MAC.php.html b/master/TokenType/MAC.php.html index 6c02b318..049b8da4 100644 --- a/master/TokenType/MAC.php.html +++ b/master/TokenType/MAC.php.html @@ -60,14 +60,14 @@
75.00%
3 / 4
CRAP -
-
- 85.71% covered (warning) +
+
+ 98.21% covered (success)
-
85.71%
-
48 / 56
+
98.21%
+
55 / 56
@@ -88,15 +88,15 @@
75.00%
3 / 4
- 21.17 -
-
- 85.71% covered (warning) + 20 +
+
+ 98.21% covered (success)
-
85.71%
-
48 / 56
+
98.21%
+
55 / 56
@@ -172,15 +172,15 @@
0.00%
0 / 1
- 12 -
-
- 0.00% covered (danger) + 3.02 +
+
+ 87.50% covered (warning)
-
0.00%
-
0 / 8
+
87.50%
+
7 / 8
@@ -321,16 +321,16 @@         if (!function_exists('hash_equals')) {             function hash_equals($knownString, $userString)             { -                 if (strlen($knownString) !== strlen($userString)) { +                 if (strlen($knownString) !== strlen($userString)) {                     return false;                 } -                 $len = strlen($knownString); -                 $result = 0; -                 for ($i = 0; $i < $len; $i++) { -                     $result |= (ord($knownString[$i]) ^ ord($userString[$i])); -                 } +                 $len = strlen($knownString); +                 $result = 0; +                 for ($i = 0; $i < $len; $i++) { +                     $result |= (ord($knownString[$i]) ^ ord($userString[$i])); +                 }                 // They are only identical strings if $result is exactly 0... -                 return 0 === $result; +                 return 0 === $result;             }         } @@ -349,7 +349,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/TokenType/TokenTypeInterface.php.html b/master/TokenType/TokenTypeInterface.php.html index 4ec2d6cd..019e7aab 100644 --- a/master/TokenType/TokenTypeInterface.php.html +++ b/master/TokenType/TokenTypeInterface.php.html @@ -140,7 +140,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/TokenType/dashboard.html b/master/TokenType/dashboard.html index d9dcad5e..c3ebfa8b 100644 --- a/master/TokenType/dashboard.html +++ b/master/TokenType/dashboard.html @@ -59,7 +59,6 @@ - MAC85% @@ -76,7 +75,6 @@ - MAC21 @@ -114,7 +112,7 @@ - hash_equals0% + hash_equals87% @@ -131,7 +129,7 @@ - hash_equals12 + hash_equals3 @@ -141,7 +139,7 @@
@@ -162,7 +160,7 @@ $(document).ready(function() { .yAxis.tickFormat(d3.format('d')); d3.select('#classCoverageDistribution svg') - .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,1,0,2], "Class Coverage")) + .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,0,1,2], "Class Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -180,7 +178,7 @@ $(document).ready(function() { .yAxis.tickFormat(d3.format('d')); d3.select('#methodCoverageDistribution svg') - .datum(getCoverageDistributionData([1,0,0,0,0,0,0,0,0,0,0,9], "Method Coverage")) + .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,1,0,9], "Method Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -231,7 +229,7 @@ $(document).ready(function() { chart.yAxis.axisLabel('Cyclomatic Complexity'); d3.select('#classComplexity svg') - .datum(getComplexityData([[100,5,"AbstractTokenType<\/a>"],[100,4,"Bearer<\/a>"],[85.714285714286,20,"MAC<\/a>"]], 'Class Complexity')) + .datum(getComplexityData([[100,5,"AbstractTokenType<\/a>"],[100,4,"Bearer<\/a>"],[98.214285714286,20,"MAC<\/a>"]], 'Class Complexity')) .transition() .duration(500) .call(chart); @@ -256,7 +254,7 @@ $(document).ready(function() { chart.yAxis.axisLabel('Method Complexity'); d3.select('#methodComplexity svg') - .datum(getComplexityData([[100,1,"AbstractTokenType::setServer<\/a>"],[100,1,"AbstractTokenType::setSession<\/a>"],[100,1,"AbstractTokenType::setParam<\/a>"],[100,2,"AbstractTokenType::getParam<\/a>"],[100,2,"Bearer::generateResponse<\/a>"],[100,2,"Bearer::determineAccessTokenInHeader<\/a>"],[100,1,"MAC::generateResponse<\/a>"],[100,13,"MAC::determineAccessTokenInHeader<\/a>"],[100,3,"MAC::anonymous function<\/a>"],[0,3,"MAC::hash_equals<\/a>"]], 'Method Complexity')) + .datum(getComplexityData([[100,1,"AbstractTokenType::setServer<\/a>"],[100,1,"AbstractTokenType::setSession<\/a>"],[100,1,"AbstractTokenType::setParam<\/a>"],[100,2,"AbstractTokenType::getParam<\/a>"],[100,2,"Bearer::generateResponse<\/a>"],[100,2,"Bearer::determineAccessTokenInHeader<\/a>"],[100,1,"MAC::generateResponse<\/a>"],[100,13,"MAC::determineAccessTokenInHeader<\/a>"],[100,3,"MAC::anonymous function<\/a>"],[87.5,3,"MAC::hash_equals<\/a>"]], 'Method Complexity')) .transition() .duration(500) .call(chart); diff --git a/master/TokenType/index.html b/master/TokenType/index.html index c9be1072..e443861f 100644 --- a/master/TokenType/index.html +++ b/master/TokenType/index.html @@ -42,15 +42,15 @@ - Total -
-
- 89.19% covered (warning) + Total +
+
+ 98.65% covered (success)
-
89.19%
-
66 / 74
+
98.65%
+
73 / 74
90.00% covered (success) @@ -126,15 +126,15 @@ - MAC.php -
-
- 85.71% covered (warning) + MAC.php +
+
+ 98.21% covered (success)
-
85.71%
-
48 / 56
+
98.21%
+
55 / 56
75.00% covered (warning) @@ -178,7 +178,7 @@ High: 90% to 100%

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Util/KeyAlgorithm/DefaultAlgorithm.php.html b/master/Util/KeyAlgorithm/DefaultAlgorithm.php.html index 8d8a9070..203ff5da 100644 --- a/master/Util/KeyAlgorithm/DefaultAlgorithm.php.html +++ b/master/Util/KeyAlgorithm/DefaultAlgorithm.php.html @@ -146,20 +146,20 @@      */     public function generate($len = 40)     { -         $stripped = ''; +         $stripped = '';         do { -             $bytes = openssl_random_pseudo_bytes($len, $strong); +             $bytes = openssl_random_pseudo_bytes($len, $strong);             // We want to stop execution if the key fails because, well, that is bad. -             if ($bytes === false || $strong === false) { +             if ($bytes === false || $strong === false) {                 // @codeCoverageIgnoreStart                 throw new \Exception('Error Generating Key');                 // @codeCoverageIgnoreEnd             } -             $stripped .= str_replace(['/', '+', '='], '', base64_encode($bytes)); -         } while (strlen($stripped) < $len); +             $stripped .= str_replace(['/', '+', '='], '', base64_encode($bytes)); +         } while (strlen($stripped) < $len); -         return substr($stripped, 0, $len); +         return substr($stripped, 0, $len);     } } @@ -174,7 +174,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Util/KeyAlgorithm/KeyAlgorithmInterface.php.html b/master/Util/KeyAlgorithm/KeyAlgorithmInterface.php.html index 8f26f56d..0160deb0 100644 --- a/master/Util/KeyAlgorithm/KeyAlgorithmInterface.php.html +++ b/master/Util/KeyAlgorithm/KeyAlgorithmInterface.php.html @@ -97,7 +97,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Util/KeyAlgorithm/dashboard.html b/master/Util/KeyAlgorithm/dashboard.html index c6d43da8..1919751b 100644 --- a/master/Util/KeyAlgorithm/dashboard.html +++ b/master/Util/KeyAlgorithm/dashboard.html @@ -138,7 +138,7 @@
diff --git a/master/Util/KeyAlgorithm/index.html b/master/Util/KeyAlgorithm/index.html index f0048823..bbb86652 100644 --- a/master/Util/KeyAlgorithm/index.html +++ b/master/Util/KeyAlgorithm/index.html @@ -123,7 +123,7 @@ High: 90% to 100%

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Util/RedirectUri.php.html b/master/Util/RedirectUri.php.html index 21c98cae..ab8dd2f0 100644 --- a/master/Util/RedirectUri.php.html +++ b/master/Util/RedirectUri.php.html @@ -171,7 +171,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Util/SecureKey.php.html b/master/Util/SecureKey.php.html index 3e9a6808..2ba0c217 100644 --- a/master/Util/SecureKey.php.html +++ b/master/Util/SecureKey.php.html @@ -199,7 +199,7 @@      */     public static function generate($len = 40)     { -         return self::getAlgorithm()->generate($len); +         return self::getAlgorithm()->generate($len);     }     /** @@ -215,11 +215,11 @@      */     public static function getAlgorithm()     { -         if (is_null(self::$algorithm)) { +         if (is_null(self::$algorithm)) {             self::$algorithm = new DefaultAlgorithm();         } -         return self::$algorithm; +         return self::$algorithm;     } } @@ -234,7 +234,7 @@ Dead Code

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/Util/dashboard.html b/master/Util/dashboard.html index 37e6b589..30ab365b 100644 --- a/master/Util/dashboard.html +++ b/master/Util/dashboard.html @@ -137,7 +137,7 @@
diff --git a/master/Util/index.html b/master/Util/index.html index 2d3dac80..4de97d17 100644 --- a/master/Util/index.html +++ b/master/Util/index.html @@ -165,7 +165,7 @@ High: 90% to 100%

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.

diff --git a/master/dashboard.html b/master/dashboard.html index 806ca540..4ded50b9 100644 --- a/master/dashboard.html +++ b/master/dashboard.html @@ -61,7 +61,6 @@ UserAuthenticationFailedEvent75% ClientAuthenticationFailedEvent75% AccessTokenEntity84% - MAC85% @@ -78,7 +77,6 @@ - MAC21 AccessTokenEntity9 @@ -117,10 +115,10 @@ - hash_equals0% getRequest0% getRequest0% hasScope0% + hash_equals87% formatScopes88% @@ -138,9 +136,9 @@ - hash_equals12 hasScope6 formatScopes4 + hash_equals3 @@ -150,7 +148,7 @@
@@ -171,7 +169,7 @@ $(document).ready(function() { .yAxis.tickFormat(d3.format('d')); d3.select('#classCoverageDistribution svg') - .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,2,2,1,33], "Class Coverage")) + .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,2,1,2,33], "Class Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -189,7 +187,7 @@ $(document).ready(function() { .yAxis.tickFormat(d3.format('d')); d3.select('#methodCoverageDistribution svg') - .datum(getCoverageDistributionData([4,0,0,0,0,0,0,0,0,1,0,152], "Method Coverage")) + .datum(getCoverageDistributionData([3,0,0,0,0,0,0,0,0,2,0,154], "Method Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -240,7 +238,7 @@ $(document).ready(function() { chart.yAxis.axisLabel('Cyclomatic Complexity'); d3.select('#classComplexity svg') - .datum(getComplexityData([[100,24,"AbstractServer<\/a>"],[100,21,"AuthorizationServer<\/a>"],[96.296296296296,18,"AbstractTokenEntity<\/a>"],[84,9,"AccessTokenEntity<\/a>"],[100,11,"AuthCodeEntity<\/a>"],[100,5,"ClientEntity<\/a>"],[100,6,"RefreshTokenEntity<\/a>"],[100,4,"ScopeEntity<\/a>"],[100,23,"SessionEntity<\/a>"],[75,3,"ClientAuthenticationFailedEvent<\/a>"],[100,3,"SessionOwnerEvent<\/a>"],[75,3,"UserAuthenticationFailedEvent<\/a>"],[100,1,"AccessDeniedException<\/a>"],[100,1,"InvalidClientException<\/a>"],[100,1,"InvalidCredentialsException<\/a>"],[100,1,"InvalidGrantException<\/a>"],[100,1,"InvalidRefreshException<\/a>"],[100,1,"InvalidRequestException<\/a>"],[100,1,"InvalidScopeException<\/a>"],[100,15,"OAuthException<\/a>"],[100,2,"ServerErrorException<\/a>"],[100,1,"UnauthorizedClientException<\/a>"],[100,1,"UnsupportedGrantTypeException<\/a>"],[100,1,"UnsupportedResponseTypeException<\/a>"],[100,21,"AbstractGrant<\/a>"],[100,25,"AuthCodeGrant<\/a>"],[100,6,"ClientCredentialsGrant<\/a>"],[100,15,"PasswordGrant<\/a>"],[100,13,"RefreshTokenGrant<\/a>"],[100,12,"ResourceServer<\/a>"],[100,2,"AbstractStorage<\/a>"],[100,5,"AbstractTokenType<\/a>"],[100,4,"Bearer<\/a>"],[85.714285714286,20,"MAC<\/a>"],[100,4,"DefaultAlgorithm<\/a>"],[100,2,"RedirectUri<\/a>"],[100,4,"SecureKey<\/a>"],[100,3,"EntityTrait<\/a>"]], 'Class Complexity')) + .datum(getComplexityData([[100,24,"AbstractServer<\/a>"],[100,21,"AuthorizationServer<\/a>"],[96.296296296296,18,"AbstractTokenEntity<\/a>"],[84,9,"AccessTokenEntity<\/a>"],[100,11,"AuthCodeEntity<\/a>"],[100,5,"ClientEntity<\/a>"],[100,6,"RefreshTokenEntity<\/a>"],[100,4,"ScopeEntity<\/a>"],[100,23,"SessionEntity<\/a>"],[75,3,"ClientAuthenticationFailedEvent<\/a>"],[100,3,"SessionOwnerEvent<\/a>"],[75,3,"UserAuthenticationFailedEvent<\/a>"],[100,1,"AccessDeniedException<\/a>"],[100,1,"InvalidClientException<\/a>"],[100,1,"InvalidCredentialsException<\/a>"],[100,1,"InvalidGrantException<\/a>"],[100,1,"InvalidRefreshException<\/a>"],[100,1,"InvalidRequestException<\/a>"],[100,1,"InvalidScopeException<\/a>"],[100,15,"OAuthException<\/a>"],[100,2,"ServerErrorException<\/a>"],[100,1,"UnauthorizedClientException<\/a>"],[100,1,"UnsupportedGrantTypeException<\/a>"],[100,1,"UnsupportedResponseTypeException<\/a>"],[100,21,"AbstractGrant<\/a>"],[100,25,"AuthCodeGrant<\/a>"],[100,6,"ClientCredentialsGrant<\/a>"],[100,15,"PasswordGrant<\/a>"],[100,16,"RefreshTokenGrant<\/a>"],[100,12,"ResourceServer<\/a>"],[100,2,"AbstractStorage<\/a>"],[100,5,"AbstractTokenType<\/a>"],[100,4,"Bearer<\/a>"],[98.214285714286,20,"MAC<\/a>"],[100,4,"DefaultAlgorithm<\/a>"],[100,2,"RedirectUri<\/a>"],[100,4,"SecureKey<\/a>"],[100,3,"EntityTrait<\/a>"]], 'Class Complexity')) .transition() .duration(500) .call(chart); @@ -265,7 +263,7 @@ $(document).ready(function() { chart.yAxis.axisLabel('Method Complexity'); d3.select('#methodComplexity svg') - .datum(getComplexityData([[100,1,"AbstractServer::__construct<\/a>"],[100,2,"AbstractServer::setEventEmitter<\/a>"],[100,1,"AbstractServer::addEventListener<\/a>"],[100,1,"AbstractServer::getEventEmitter<\/a>"],[100,1,"AbstractServer::setRequest<\/a>"],[100,2,"AbstractServer::getRequest<\/a>"],[100,1,"AbstractServer::setClientStorage<\/a>"],[100,1,"AbstractServer::setSessionStorage<\/a>"],[100,1,"AbstractServer::setAccessTokenStorage<\/a>"],[100,1,"AbstractServer::setRefreshTokenStorage<\/a>"],[100,1,"AbstractServer::setAuthCodeStorage<\/a>"],[100,1,"AbstractServer::setScopeStorage<\/a>"],[100,1,"AbstractServer::getClientStorage<\/a>"],[100,1,"AbstractServer::getScopeStorage<\/a>"],[100,1,"AbstractServer::getSessionStorage<\/a>"],[100,1,"AbstractServer::getRefreshTokenStorage<\/a>"],[100,1,"AbstractServer::getAccessTokenStorage<\/a>"],[100,1,"AbstractServer::getAuthCodeStorage<\/a>"],[100,1,"AbstractServer::setTokenType<\/a>"],[100,1,"AbstractServer::getTokenType<\/a>"],[100,1,"AbstractServer::getMacStorage<\/a>"],[100,1,"AbstractServer::setMacStorage<\/a>"],[100,1,"AuthorizationServer::__construct<\/a>"],[100,3,"AuthorizationServer::addGrantType<\/a>"],[100,1,"AuthorizationServer::hasGrantType<\/a>"],[100,1,"AuthorizationServer::getResponseTypes<\/a>"],[100,1,"AuthorizationServer::requireScopeParam<\/a>"],[100,1,"AuthorizationServer::scopeParamRequired<\/a>"],[100,1,"AuthorizationServer::setDefaultScope<\/a>"],[100,1,"AuthorizationServer::getDefaultScope<\/a>"],[100,1,"AuthorizationServer::stateParamRequired<\/a>"],[100,1,"AuthorizationServer::requireStateParam<\/a>"],[100,1,"AuthorizationServer::getScopeDelimiter<\/a>"],[100,1,"AuthorizationServer::setScopeDelimiter<\/a>"],[100,1,"AuthorizationServer::getAccessTokenTTL<\/a>"],[100,1,"AuthorizationServer::setAccessTokenTTL<\/a>"],[100,3,"AuthorizationServer::issueAccessToken<\/a>"],[100,2,"AuthorizationServer::getGrantType<\/a>"],[100,1,"AbstractTokenEntity::__construct<\/a>"],[100,1,"AbstractTokenEntity::setSession<\/a>"],[100,1,"AbstractTokenEntity::setExpireTime<\/a>"],[100,1,"AbstractTokenEntity::getExpireTime<\/a>"],[100,1,"AbstractTokenEntity::isExpired<\/a>"],[100,2,"AbstractTokenEntity::setId<\/a>"],[100,1,"AbstractTokenEntity::getId<\/a>"],[100,2,"AbstractTokenEntity::associateScope<\/a>"],[88.888888888889,4,"AbstractTokenEntity::formatScopes<\/a>"],[100,2,"AbstractTokenEntity::__toString<\/a>"],[100,1,"AbstractTokenEntity::expire<\/a>"],[100,1,"AbstractTokenEntity::save<\/a>"],[100,2,"AccessTokenEntity::getSession<\/a>"],[0,2,"AccessTokenEntity::hasScope<\/a>"],[100,2,"AccessTokenEntity::getScopes<\/a>"],[100,2,"AccessTokenEntity::save<\/a>"],[100,1,"AccessTokenEntity::expire<\/a>"],[100,1,"AuthCodeEntity::setRedirectUri<\/a>"],[100,1,"AuthCodeEntity::getRedirectUri<\/a>"],[100,2,"AuthCodeEntity::generateRedirectUri<\/a>"],[100,2,"AuthCodeEntity::getSession<\/a>"],[100,2,"AuthCodeEntity::getScopes<\/a>"],[100,2,"AuthCodeEntity::save<\/a>"],[100,1,"AuthCodeEntity::expire<\/a>"],[100,1,"ClientEntity::__construct<\/a>"],[100,1,"ClientEntity::getId<\/a>"],[100,1,"ClientEntity::getSecret<\/a>"],[100,1,"ClientEntity::getName<\/a>"],[100,1,"ClientEntity::getRedirectUri<\/a>"],[100,1,"RefreshTokenEntity::setAccessTokenId<\/a>"],[100,1,"RefreshTokenEntity::setAccessToken<\/a>"],[100,2,"RefreshTokenEntity::getAccessToken<\/a>"],[100,1,"RefreshTokenEntity::save<\/a>"],[100,1,"RefreshTokenEntity::expire<\/a>"],[100,1,"ScopeEntity::__construct<\/a>"],[100,1,"ScopeEntity::getId<\/a>"],[100,1,"ScopeEntity::getDescription<\/a>"],[100,1,"ScopeEntity::jsonSerialize<\/a>"],[100,1,"SessionEntity::__construct<\/a>"],[100,1,"SessionEntity::setId<\/a>"],[100,1,"SessionEntity::getId<\/a>"],[100,2,"SessionEntity::associateScope<\/a>"],[100,2,"SessionEntity::hasScope<\/a>"],[100,2,"SessionEntity::getScopes<\/a>"],[100,4,"SessionEntity::formatScopes<\/a>"],[100,1,"SessionEntity::associateAccessToken<\/a>"],[100,1,"SessionEntity::associateRefreshToken<\/a>"],[100,1,"SessionEntity::associateClient<\/a>"],[100,2,"SessionEntity::getClient<\/a>"],[100,1,"SessionEntity::setOwner<\/a>"],[100,1,"SessionEntity::getOwnerId<\/a>"],[100,1,"SessionEntity::getOwnerType<\/a>"],[100,2,"SessionEntity::save<\/a>"],[100,1,"ClientAuthenticationFailedEvent::__construct<\/a>"],[100,1,"ClientAuthenticationFailedEvent::getName<\/a>"],[0,1,"ClientAuthenticationFailedEvent::getRequest<\/a>"],[100,1,"SessionOwnerEvent::__construct<\/a>"],[100,1,"SessionOwnerEvent::getName<\/a>"],[100,1,"SessionOwnerEvent::getSession<\/a>"],[100,1,"UserAuthenticationFailedEvent::__construct<\/a>"],[100,1,"UserAuthenticationFailedEvent::getName<\/a>"],[0,1,"UserAuthenticationFailedEvent::getRequest<\/a>"],[100,1,"AccessDeniedException::__construct<\/a>"],[100,1,"InvalidClientException::__construct<\/a>"],[100,1,"InvalidCredentialsException::__construct<\/a>"],[100,1,"InvalidGrantException::__construct<\/a>"],[100,1,"InvalidRefreshException::__construct<\/a>"],[100,1,"InvalidRequestException::__construct<\/a>"],[100,1,"InvalidScopeException::__construct<\/a>"],[100,1,"OAuthException::__construct<\/a>"],[100,2,"OAuthException::shouldRedirect<\/a>"],[100,1,"OAuthException::getRedirectUri<\/a>"],[100,11,"OAuthException::getHttpHeaders<\/a>"],[100,2,"ServerErrorException::__construct<\/a>"],[100,1,"UnauthorizedClientException::__construct<\/a>"],[100,1,"UnsupportedGrantTypeException::__construct<\/a>"],[100,1,"UnsupportedResponseTypeException::__construct<\/a>"],[100,1,"AbstractGrant::getIdentifier<\/a>"],[100,1,"AbstractGrant::setIdentifier<\/a>"],[100,1,"AbstractGrant::getResponseType<\/a>"],[100,2,"AbstractGrant::getAccessTokenTTL<\/a>"],[100,1,"AbstractGrant::setAccessTokenTTL<\/a>"],[100,1,"AbstractGrant::setAuthorizationServer<\/a>"],[100,11,"AbstractGrant::validateScopes<\/a>"],[100,3,"AbstractGrant::formatScopes<\/a>"],[100,1,"AuthCodeGrant::setAuthTokenTTL<\/a>"],[100,8,"AuthCodeGrant::checkAuthorizeParams<\/a>"],[100,2,"AuthCodeGrant::newAuthorizeRequest<\/a>"],[100,14,"AuthCodeGrant::completeFlow<\/a>"],[100,6,"ClientCredentialsGrant::completeFlow<\/a>"],[100,1,"PasswordGrant::setVerifyCredentialsCallback<\/a>"],[100,3,"PasswordGrant::getVerifyCredentialsCallback<\/a>"],[100,11,"PasswordGrant::completeFlow<\/a>"],[100,1,"RefreshTokenGrant::setRefreshTokenTTL<\/a>"],[100,1,"RefreshTokenGrant::getRefreshTokenTTL<\/a>"],[100,11,"RefreshTokenGrant::completeFlow<\/a>"],[100,1,"ResourceServer::__construct<\/a>"],[100,1,"ResourceServer::setIdKey<\/a>"],[100,1,"ResourceServer::getAccessToken<\/a>"],[100,4,"ResourceServer::isValidRequest<\/a>"],[100,5,"ResourceServer::determineAccessToken<\/a>"],[100,1,"AbstractStorage::setServer<\/a>"],[100,1,"AbstractStorage::getServer<\/a>"],[100,1,"AbstractTokenType::setServer<\/a>"],[100,1,"AbstractTokenType::setSession<\/a>"],[100,1,"AbstractTokenType::setParam<\/a>"],[100,2,"AbstractTokenType::getParam<\/a>"],[100,2,"Bearer::generateResponse<\/a>"],[100,2,"Bearer::determineAccessTokenInHeader<\/a>"],[100,1,"MAC::generateResponse<\/a>"],[100,13,"MAC::determineAccessTokenInHeader<\/a>"],[100,3,"MAC::anonymous function<\/a>"],[0,3,"MAC::hash_equals<\/a>"],[100,4,"DefaultAlgorithm::generate<\/a>"],[100,2,"RedirectUri::make<\/a>"],[100,1,"SecureKey::generate<\/a>"],[100,1,"SecureKey::setAlgorithm<\/a>"],[100,2,"SecureKey::getAlgorithm<\/a>"],[100,3,"EntityTrait::hydrate<\/a>"]], 'Method Complexity')) + .datum(getComplexityData([[100,1,"AbstractServer::__construct<\/a>"],[100,2,"AbstractServer::setEventEmitter<\/a>"],[100,1,"AbstractServer::addEventListener<\/a>"],[100,1,"AbstractServer::getEventEmitter<\/a>"],[100,1,"AbstractServer::setRequest<\/a>"],[100,2,"AbstractServer::getRequest<\/a>"],[100,1,"AbstractServer::setClientStorage<\/a>"],[100,1,"AbstractServer::setSessionStorage<\/a>"],[100,1,"AbstractServer::setAccessTokenStorage<\/a>"],[100,1,"AbstractServer::setRefreshTokenStorage<\/a>"],[100,1,"AbstractServer::setAuthCodeStorage<\/a>"],[100,1,"AbstractServer::setScopeStorage<\/a>"],[100,1,"AbstractServer::getClientStorage<\/a>"],[100,1,"AbstractServer::getScopeStorage<\/a>"],[100,1,"AbstractServer::getSessionStorage<\/a>"],[100,1,"AbstractServer::getRefreshTokenStorage<\/a>"],[100,1,"AbstractServer::getAccessTokenStorage<\/a>"],[100,1,"AbstractServer::getAuthCodeStorage<\/a>"],[100,1,"AbstractServer::setTokenType<\/a>"],[100,1,"AbstractServer::getTokenType<\/a>"],[100,1,"AbstractServer::getMacStorage<\/a>"],[100,1,"AbstractServer::setMacStorage<\/a>"],[100,1,"AuthorizationServer::__construct<\/a>"],[100,3,"AuthorizationServer::addGrantType<\/a>"],[100,1,"AuthorizationServer::hasGrantType<\/a>"],[100,1,"AuthorizationServer::getResponseTypes<\/a>"],[100,1,"AuthorizationServer::requireScopeParam<\/a>"],[100,1,"AuthorizationServer::scopeParamRequired<\/a>"],[100,1,"AuthorizationServer::setDefaultScope<\/a>"],[100,1,"AuthorizationServer::getDefaultScope<\/a>"],[100,1,"AuthorizationServer::stateParamRequired<\/a>"],[100,1,"AuthorizationServer::requireStateParam<\/a>"],[100,1,"AuthorizationServer::getScopeDelimiter<\/a>"],[100,1,"AuthorizationServer::setScopeDelimiter<\/a>"],[100,1,"AuthorizationServer::getAccessTokenTTL<\/a>"],[100,1,"AuthorizationServer::setAccessTokenTTL<\/a>"],[100,3,"AuthorizationServer::issueAccessToken<\/a>"],[100,2,"AuthorizationServer::getGrantType<\/a>"],[100,1,"AbstractTokenEntity::__construct<\/a>"],[100,1,"AbstractTokenEntity::setSession<\/a>"],[100,1,"AbstractTokenEntity::setExpireTime<\/a>"],[100,1,"AbstractTokenEntity::getExpireTime<\/a>"],[100,1,"AbstractTokenEntity::isExpired<\/a>"],[100,2,"AbstractTokenEntity::setId<\/a>"],[100,1,"AbstractTokenEntity::getId<\/a>"],[100,2,"AbstractTokenEntity::associateScope<\/a>"],[88.888888888889,4,"AbstractTokenEntity::formatScopes<\/a>"],[100,2,"AbstractTokenEntity::__toString<\/a>"],[100,1,"AbstractTokenEntity::expire<\/a>"],[100,1,"AbstractTokenEntity::save<\/a>"],[100,2,"AccessTokenEntity::getSession<\/a>"],[0,2,"AccessTokenEntity::hasScope<\/a>"],[100,2,"AccessTokenEntity::getScopes<\/a>"],[100,2,"AccessTokenEntity::save<\/a>"],[100,1,"AccessTokenEntity::expire<\/a>"],[100,1,"AuthCodeEntity::setRedirectUri<\/a>"],[100,1,"AuthCodeEntity::getRedirectUri<\/a>"],[100,2,"AuthCodeEntity::generateRedirectUri<\/a>"],[100,2,"AuthCodeEntity::getSession<\/a>"],[100,2,"AuthCodeEntity::getScopes<\/a>"],[100,2,"AuthCodeEntity::save<\/a>"],[100,1,"AuthCodeEntity::expire<\/a>"],[100,1,"ClientEntity::__construct<\/a>"],[100,1,"ClientEntity::getId<\/a>"],[100,1,"ClientEntity::getSecret<\/a>"],[100,1,"ClientEntity::getName<\/a>"],[100,1,"ClientEntity::getRedirectUri<\/a>"],[100,1,"RefreshTokenEntity::setAccessTokenId<\/a>"],[100,1,"RefreshTokenEntity::setAccessToken<\/a>"],[100,2,"RefreshTokenEntity::getAccessToken<\/a>"],[100,1,"RefreshTokenEntity::save<\/a>"],[100,1,"RefreshTokenEntity::expire<\/a>"],[100,1,"ScopeEntity::__construct<\/a>"],[100,1,"ScopeEntity::getId<\/a>"],[100,1,"ScopeEntity::getDescription<\/a>"],[100,1,"ScopeEntity::jsonSerialize<\/a>"],[100,1,"SessionEntity::__construct<\/a>"],[100,1,"SessionEntity::setId<\/a>"],[100,1,"SessionEntity::getId<\/a>"],[100,2,"SessionEntity::associateScope<\/a>"],[100,2,"SessionEntity::hasScope<\/a>"],[100,2,"SessionEntity::getScopes<\/a>"],[100,4,"SessionEntity::formatScopes<\/a>"],[100,1,"SessionEntity::associateAccessToken<\/a>"],[100,1,"SessionEntity::associateRefreshToken<\/a>"],[100,1,"SessionEntity::associateClient<\/a>"],[100,2,"SessionEntity::getClient<\/a>"],[100,1,"SessionEntity::setOwner<\/a>"],[100,1,"SessionEntity::getOwnerId<\/a>"],[100,1,"SessionEntity::getOwnerType<\/a>"],[100,2,"SessionEntity::save<\/a>"],[100,1,"ClientAuthenticationFailedEvent::__construct<\/a>"],[100,1,"ClientAuthenticationFailedEvent::getName<\/a>"],[0,1,"ClientAuthenticationFailedEvent::getRequest<\/a>"],[100,1,"SessionOwnerEvent::__construct<\/a>"],[100,1,"SessionOwnerEvent::getName<\/a>"],[100,1,"SessionOwnerEvent::getSession<\/a>"],[100,1,"UserAuthenticationFailedEvent::__construct<\/a>"],[100,1,"UserAuthenticationFailedEvent::getName<\/a>"],[0,1,"UserAuthenticationFailedEvent::getRequest<\/a>"],[100,1,"AccessDeniedException::__construct<\/a>"],[100,1,"InvalidClientException::__construct<\/a>"],[100,1,"InvalidCredentialsException::__construct<\/a>"],[100,1,"InvalidGrantException::__construct<\/a>"],[100,1,"InvalidRefreshException::__construct<\/a>"],[100,1,"InvalidRequestException::__construct<\/a>"],[100,1,"InvalidScopeException::__construct<\/a>"],[100,1,"OAuthException::__construct<\/a>"],[100,2,"OAuthException::shouldRedirect<\/a>"],[100,1,"OAuthException::getRedirectUri<\/a>"],[100,11,"OAuthException::getHttpHeaders<\/a>"],[100,2,"ServerErrorException::__construct<\/a>"],[100,1,"UnauthorizedClientException::__construct<\/a>"],[100,1,"UnsupportedGrantTypeException::__construct<\/a>"],[100,1,"UnsupportedResponseTypeException::__construct<\/a>"],[100,1,"AbstractGrant::getIdentifier<\/a>"],[100,1,"AbstractGrant::setIdentifier<\/a>"],[100,1,"AbstractGrant::getResponseType<\/a>"],[100,2,"AbstractGrant::getAccessTokenTTL<\/a>"],[100,1,"AbstractGrant::setAccessTokenTTL<\/a>"],[100,1,"AbstractGrant::setAuthorizationServer<\/a>"],[100,11,"AbstractGrant::validateScopes<\/a>"],[100,3,"AbstractGrant::formatScopes<\/a>"],[100,1,"AuthCodeGrant::setAuthTokenTTL<\/a>"],[100,8,"AuthCodeGrant::checkAuthorizeParams<\/a>"],[100,2,"AuthCodeGrant::newAuthorizeRequest<\/a>"],[100,14,"AuthCodeGrant::completeFlow<\/a>"],[100,6,"ClientCredentialsGrant::completeFlow<\/a>"],[100,1,"PasswordGrant::setVerifyCredentialsCallback<\/a>"],[100,3,"PasswordGrant::getVerifyCredentialsCallback<\/a>"],[100,11,"PasswordGrant::completeFlow<\/a>"],[100,1,"RefreshTokenGrant::setRefreshTokenTTL<\/a>"],[100,1,"RefreshTokenGrant::getRefreshTokenTTL<\/a>"],[100,1,"RefreshTokenGrant::setRefreshTokenRotation<\/a>"],[100,1,"RefreshTokenGrant::shouldRotateRefreshTokens<\/a>"],[100,12,"RefreshTokenGrant::completeFlow<\/a>"],[100,1,"ResourceServer::__construct<\/a>"],[100,1,"ResourceServer::setIdKey<\/a>"],[100,1,"ResourceServer::getAccessToken<\/a>"],[100,4,"ResourceServer::isValidRequest<\/a>"],[100,5,"ResourceServer::determineAccessToken<\/a>"],[100,1,"AbstractStorage::setServer<\/a>"],[100,1,"AbstractStorage::getServer<\/a>"],[100,1,"AbstractTokenType::setServer<\/a>"],[100,1,"AbstractTokenType::setSession<\/a>"],[100,1,"AbstractTokenType::setParam<\/a>"],[100,2,"AbstractTokenType::getParam<\/a>"],[100,2,"Bearer::generateResponse<\/a>"],[100,2,"Bearer::determineAccessTokenInHeader<\/a>"],[100,1,"MAC::generateResponse<\/a>"],[100,13,"MAC::determineAccessTokenInHeader<\/a>"],[100,3,"MAC::anonymous function<\/a>"],[87.5,3,"MAC::hash_equals<\/a>"],[100,4,"DefaultAlgorithm::generate<\/a>"],[100,2,"RedirectUri::make<\/a>"],[100,1,"SecureKey::generate<\/a>"],[100,1,"SecureKey::setAlgorithm<\/a>"],[100,2,"SecureKey::getAlgorithm<\/a>"],[100,3,"EntityTrait::hydrate<\/a>"]], 'Method Complexity')) .transition() .duration(500) .call(chart); diff --git a/master/index.html b/master/index.html index 85a63094..5e18d84e 100644 --- a/master/index.html +++ b/master/index.html @@ -43,21 +43,21 @@ Total
-
- 98.05% covered (success) +
+ 98.97% covered (success)
-
98.05%
-
753 / 768
+
98.97%
+
765 / 773
-
- 96.77% covered (success) +
+ 96.82% covered (success)
-
96.77%
-
150 / 155
+
96.82%
+
152 / 157
86.84% covered (warning) @@ -161,7 +161,7 @@
100.00%
-
311 / 311
+
317 / 317
100.00% covered (success) @@ -169,7 +169,7 @@
100.00%
-
19 / 19
+
21 / 21
100.00% covered (success) @@ -209,15 +209,15 @@ - TokenType -
-
- 89.19% covered (warning) + TokenType +
+
+ 98.65% covered (success)
-
89.19%
-
66 / 74
+
98.65%
+
73 / 74
90.00% covered (success) @@ -301,7 +301,7 @@
100.00%
-
39 / 39
+
38 / 38
100.00% covered (success) @@ -360,7 +360,7 @@ High: 90% to 100%

- Generated by PHP_CodeCoverage 2.0.14 using PHP 5.6.3 and PHPUnit 4.3.5 at Sat Dec 27 22:53:25 UTC 2014. + Generated by PHP_CodeCoverage 2.0.14 using PHP 5.4.35 and PHPUnit 4.3.5 at Sat Dec 27 23:03:41 UTC 2014.