Commit Graph

345 Commits

Author SHA1 Message Date
sephster
74495cac49
Set proper confidential settings in existing tests 2018-08-16 12:59:10 +01:00
Andrew Millington
fb43801458
Change function name to setConfidential() 2018-08-15 21:40:41 +01:00
sephster
8ab27ede39
Add test to ensure public clients are asked to provide a code challenge 2018-08-13 22:54:12 +01:00
sephster
0105a20126
Reverted tests to remove isConfidential check 2018-08-13 22:00:34 +01:00
sephster
491852b521
Move code challenge check to auth code request 2018-08-13 21:47:53 +01:00
sephster
7f2fd7b22c
Add set confidential to clients for tests 2018-08-13 21:21:59 +01:00
Andrew Millington
abef682031
Add setIsConfidential to client stub for tests 2018-08-12 20:34:58 +01:00
Andrew Millington
5ad00b0e33
Remove enableCodeExchangeProof function 2018-07-29 22:34:37 +01:00
Andrew Millington
f49cc65c13
Change to store code challenge and method whenever sent for PKCE 2018-07-29 19:56:30 +01:00
Andrew Millington
0c542637fe
Merge branch '8.0.0' into fix-909-v2 2018-06-24 13:51:04 +01:00
Andrew Millington
2fcee76d13
Remove unused stub function 2018-06-24 13:39:40 +01:00
Andrew Millington
574299d862
Fix tests 2018-06-24 13:38:55 +01:00
Andrew Millington
dad3b1e1c9
Remove unused test 2018-06-24 13:32:49 +01:00
Andrew Millington
369c7005a3
Merge master into version 8 branch 2018-06-24 01:10:02 +01:00
Andrew Millington
e4a7fea834
Move OAuthServerExceptionTest to appropriate folder 2018-05-25 10:00:21 +01:00
Andrew Millington
466e1a639d
Merge remote-tracking branch 'upstream/master' into exception-has-redirect 2018-05-25 09:49:14 +01:00
Andrew Millington
72ead2e3ce
Fix unused use statement 2018-05-24 12:23:26 +01:00
Andrew Millington
ae4ab26aaf
Add test for unsigned access token 2018-05-24 12:19:55 +01:00
Andrew Millington
61156ef8c7
Use __toString() for access token 2018-05-23 16:34:39 +01:00
Andrew Millington
4aeb92aa98
Merge remote-tracking branch 'upstream/8.0.0' into access-token-jwt 2018-05-21 16:18:24 +01:00
Andrew Millington
b1b33207ab Fix namespacing for Exception test 2018-05-13 18:02:23 +01:00
Andrew Millington
f8c2e721a0 Remove return voids and fix docblock and use orders 2018-05-13 17:41:21 +01:00
Andrew Millington
33ce849617 Add tests for invalid client exception 2018-05-13 17:29:07 +01:00
Andrew Millington
48ce5f36cf
Change function name to be less technically specific 2018-05-07 20:37:20 +02:00
Lukáš Unger
fd72d79ad3
Generalized access token format 2018-05-07 20:37:20 +02:00
Andrew Millington
491c23c1e9
Merge remote-tracking branch 'upstream/master' into phpstan-level-7 2018-04-21 21:37:24 +01:00
Andrew Millington
c8b44ff5c7
Revert fix for client ID exception 2018-04-20 18:22:07 +01:00
Andrew Millington
a56acc8dd0 Minor code tidy up 2018-02-28 20:33:19 +00:00
Andrew Millington
c9b07f386c Fix StyleCI issues and remove phpdoc order from StyleCI 2018-02-28 20:01:01 +00:00
Andrew Millington
00a7972f74 Merge remote-tracking branch 'upstream/master' 2018-02-28 19:45:41 +00: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
Lukáš Unger
143afc9561
PHPStan level 7 2018-02-18 21:20:48 +01:00
Andrew Millington
e0cc5ee1b0
Merge branch 'master' of https://github.com/thephpleague/oauth2-server into fix-pkce-implementation 2018-02-18 13:57:19 +00:00
Andrew Millington
b78c012796
Change code challenge and verifier to be constants in test 2018-02-18 13:51:34 +00:00
Andrew Millington
25c3c216a0 Apply fixes from StyleCI 2018-02-17 19:31:59 +00:00
Lukáš Unger
1f87c7a7be
Update PHPUnit, run static analysis on tests 2018-02-11 23:22:46 +01: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
Andrew Millington
8bbd218856
Merge pull request #842 from sgomez/fix-challenge-pkce
Fix S256 code challenge method
2018-01-25 23:16:15 +00:00
Andrew Millington
eb9cde5ab7
Merge pull request #805 from raarts/Accept-RSA-key-with-crlf-v2
Also accept an RSA key with crlf
2018-01-23 22:24:52 +00: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
SunMar
292272d128 Allow CryptTrait to accept a \Defuse\Crypto\Key as encryption key #812 2018-01-04 15:14:03 +01:00
Ron Arts
91d9c11fb4 Fixed tests, allow whitespace at the end of a key 2018-01-03 10:18:32 +01:00
Ron Arts
2ec8d148b0 fix .gitattributes 2018-01-03 09:41:39 +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
57ca83a8ba
Removing missing scope tests as temporarily reverted this functionality 2017-12-24 00:18:20 +00:00
Andrew Millington
41bba7f58c
Removing missing scope test
Temporarily removing missing scope test as have reverted this functionality for version 6.1.1
2017-12-24 00:07:22 +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