Andrew Millington
61156ef8c7
Use __toString() for access token
2018-05-23 16:34:39 +01:00
Andrew Millington
c8b44ff5c7
Revert fix for client ID exception
2018-04-20 18:22:07 +01:00
Simon Hamp
6723aadfe8
Fix #837
...
Unifies how we fetch the client_id from the request and allows us to throw a more appropriate exception when the client_id parameter is missing.
Improves the test method for this validation by checking the culpable method in this particular case. The test was missing this by calling the wrong method.
2018-02-26 15:56:28 +00:00
Andrew Millington
b78c012796
Change code challenge and verifier to be constants in test
2018-02-18 13:51:34 +00:00
Erick Torres
ce2662ece7
Merge branch 'master' of github.com:thephpleague/oauth2-server into fix-pkce-implementation
...
# Conflicts:
# tests/Grant/AuthCodeGrantTest.php
2018-02-05 15:32:15 -05:00
Sergio Gómez
1b692e2298
Fix S256 code challenge method
...
According to [RFC7636#section-4.3](https://tools.ietf.org/html/rfc7636#section-4.3 ):
If the "code_challenge_method" from Section 4.3 was "S256", the
received "code_verifier" is hashed by SHA-256, base64url-encoded, and
then compared to the "code_challenge", i.e.:
BASE64URL-ENCODE(SHA256(ASCII(code_verifier))) == code_challenge
So, the hash must be done before the base64_encode.
The tests are modified to use example data from the
[RFC7636#appendix-B](https://tools.ietf.org/html/rfc7636#appendix-B ).
2018-01-18 05:31:44 +01:00
Erick Torres
01d21b2533
Update statement to generate codeChallenge in AuthCodeGrantTest
2017-12-29 12:32:12 -05:00
Andrew Millington
b6d9835281
Merge branch 'master' into fix-pkce-implementation
2017-12-28 16:37:37 +00:00
Andrew Millington
dcae4af6ce
Remove missing scope test
...
Temporarily removing missing scope test for the AuthGrant
2017-12-24 00:06:18 +00:00
Andrew Millington
1c36b70dab
Fixed ordering so we only hash after base64 encoding
2017-12-23 02:06:18 +00:00
Andrew Millington
f11e4c81cd
Merge pull request #697 from fkooman/fix-s256
...
Fix PKCE code verifier encoding to match specification
2017-12-23 01:52:33 +00:00
Gabriel Caruso
9ceafe5dd3
Refactoring tests
2017-12-06 18:24:42 -02:00
Sephster
b50c7622db
Add in validation for authorization requests.
...
Fixes thephpleague/oauth2-server#677
2017-11-14 00:12:04 +00:00
Sephster
dc9c1a1023
Remove blank line to keep code consistent
2017-11-13 23:59:55 +00:00
Sephster
7878cf9c13
Merge remote-tracking branch 'upstream/master'
2017-11-13 23:52:36 +00:00
Sephster
1bcee9aaba
Add a test for a missing scope for the password grant
2017-11-13 23:16:30 +00:00
Sephster
a5c5929dc9
Change default scope to be basic
2017-11-13 22:34:12 +00:00
Gabriel Caruso
04f3d39b45
Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase
2017-11-08 16:07:07 -02:00
Andrew Millington
ce8248c10f
Remove erroneous character
2017-11-06 22:56:54 +00:00
Andrew Millington
13be557825
Re-add the complete testCompleteAuthorizationRequestNoUser()
2017-11-06 22:51:11 +00:00
Andrew Millington
0f08063864
Fixed use of default scope so it is only for authorization requests
2017-11-06 22:33:28 +00:00
Brian Retterer
23c7138d48
Apply fixes from StyleCI
2017-10-23 15:26:10 +00:00
Andrew Millington
4d28eadf93
Update tests so they don't trigger missing or invalid scope exceptions
2017-10-18 22:11:02 +01:00
Erick Torres
e2f9b73df3
Fix broken tests
2017-07-07 12:19:11 -05:00
Erick Torres
fbb3586cae
Merge branch 'master' of github.com:erickjth/oauth2-server into fix-pkce-implementation
...
# Conflicts:
# src/Grant/AuthCodeGrant.php
# tests/Grant/AuthCodeGrantTest.php
2017-07-07 12:06:32 -05:00
Alex Bilbie
aac467e616
Fixed broken tests
2017-07-01 18:11:19 +01:00
Alex Bilbie
57d199b889
Stricter validation of code challenge value to match RFC 7636 requirements
2017-07-01 16:44:43 +01:00
Erick Torres
11ad87b5f5
Update tests / Add missing.
2017-06-16 12:03:14 -05:00
François Kooman
6426e597a3
Fix PKCE code verifier encoding to match specification
...
The current implementation of PKCE does not follow the specification
correctly regarding the encoding of the code verifier. This patch
correctly encodes the hash of the code verifier according to
Appenix A of RFC 7636.
2017-01-24 11:36:34 +01:00
Alex Bilbie
11ccc305d0
Applied fixes from StyleCI
2016-09-13 14:17:09 +00:00
Lukáš Unger
17b6e2a207
tests: Fix missing redirect uri test, add redirect uri mismatch test
2016-07-08 16:04:14 +02:00
Lukáš Unger
54422a244f
tests: AuthCodeGrantTest additional tests
2016-07-08 15:31:29 +02:00
Lukáš Unger
32efd091a1
tests: use MockBuilder everywhere
2016-07-08 15:29:21 +02:00
Ivan Kurnosov
b68ef973df
Added a check for unique access token constraint violation
2016-06-20 20:19:03 +12:00
Alex Bilbie
8e8aed1a50
Implemented RFC7636. Fixes #574
2016-05-06 15:23:16 +01:00
Alex Bilbie
103b0cc50d
Fixed broken test
2016-04-10 17:15:48 +01:00
Alex Bilbie
495b55d1e8
Applied fixes from StyleCI
2016-04-10 11:14:08 -04:00
Alex Bilbie
92a483b3bd
Improved tests
2016-04-10 16:14:01 +01:00
Alex Bilbie
5969082963
Fix tests and improve code coverate
2016-04-10 15:58:01 +01:00
Alex Bilbie
7a6d9a4510
Fixed broken AuthCodeGrant tests
2016-04-10 15:15:29 +01:00
Alex Bilbie
2c2ef800d4
Applied fixes from StyleCI
2016-04-09 10:46:40 -04:00
Alex Bilbie
47656cd9b5
Fix broken tests
2016-04-09 15:44:38 +01:00
Alex Bilbie
c6faa228fe
Updated references to interfaces
2016-04-09 15:25:45 +01:00
Alex Bilbie
3c0a7f14ab
Fixed broken tests
2016-04-09 14:15:10 +01:00
Alex Bilbie
198f4c4b6f
Merge branch 'token_from_repo' of https://github.com/frederikbosch/oauth2-server into frederikbosch-token_from_repo
...
# Conflicts:
# tests/Grant/AuthCodeGrantTest.php
# tests/Grant/ImplicitGrantTest.php
# tests/Grant/RefreshTokenGrantTest.php
2016-04-09 14:12:06 +01:00
Frederik Bosch
de8f6ff539
add getNewAccessToken getNewRefreshToken and getNewAuthCode to repositories
2016-04-04 10:37:06 +02:00
Julián Gutiérrez
197657f2b9
handle RSA key passphrase
2016-03-28 16:42:34 +02:00
Alex Bilbie
a18b8c57b2
Fix broken tests
2016-03-23 18:50:14 +00:00
Julián Gutiérrez
4b775fe241
include CryptTrait tests, allow Server::respondToRequest trhow exceptions and fix ResposeType tests
2016-03-18 00:25:32 +01:00
Julián Gutiérrez
890fdeba16
CryptTrait tests
2016-03-17 21:18:28 +01:00