Commit Graph

653 Commits

Author SHA1 Message Date
Alex Bilbie
6300cd5d72 Set the default token type as Bearer 2014-05-07 17:09:34 +01:00
Alex Bilbie
0b047fd8e4 Update token types 2014-05-07 17:09:19 +01:00
Luca Degasperi
07c04d15d7 updated calls to proper request methods 2014-05-06 14:30:25 +02:00
Luca Degasperi
95d068e818 Added a missing use statement 2014-05-06 13:52:50 +02:00
Alex Bilbie
c5ffd05eee First commit of token types 2014-05-03 14:03:02 +01:00
Alex Bilbie
f7e68d6e10 Fixed auth code entity storage calls 2014-05-03 11:40:39 +01:00
Alex Bilbie
719b87a40c Added missing methods to auth code storage interface 2014-05-03 11:39:18 +01:00
Alex Bilbie
19bd476395 Fix silly mistake 2014-05-03 11:13:36 +01:00
Alex Bilbie
b82551c97d PHPCS fixes 2014-05-03 11:08:33 +01:00
Alex Bilbie
ed7f5370ca More CS fixer changes 2014-05-03 10:53:57 +01:00
Alex Bilbie
97e7a00bca CS fixer changes 2014-05-03 10:53:43 +01:00
Alex Bilbie
ffc25fb276 Renamed Grants 2014-05-02 17:24:55 +01:00
Alex Bilbie
97fd115530 Updated with new entity names 2014-05-02 17:21:53 +01:00
Alex Bilbie
228144a701 Inject server 2014-05-02 15:14:46 +01:00
Alex Bilbie
184fac507b Bug fix for OAuthException 2014-05-02 15:14:36 +01:00
Alex Bilbie
82c10c32fd Removed FQN 2014-05-02 15:14:25 +01:00
Alex Bilbie
782f43c73a Updated entity class names 2014-05-02 15:14:12 +01:00
Alex Bilbie
bdd2bc322c Renamed entities (added Entity to the end of class name) 2014-05-02 15:12:00 +01:00
Alex Bilbie
e5315dc016 Test fixes 2014-05-01 14:57:12 +01:00
Alex Bilbie
8b4b884a03 Pass the token instead of string 2014-05-01 14:47:01 +01:00
Alex Bilbie
f78caa24bb Renamed method to be more obvious 2014-05-01 14:46:43 +01:00
Alex Bilbie
79b1e39798 Removed special case for cURL 2014-05-01 14:46:35 +01:00
Alex Bilbie
797ed66eda Added getBySession 2014-05-01 14:46:22 +01:00
Alex Bilbie
16bdc36ccb Accept token instead of strings 2014-05-01 14:45:38 +01:00
Alex Bilbie
b5f02d0739 Inject the access token object 2014-05-01 14:44:13 +01:00
Alex Bilbie
9f1f0cc3bc Updates to exceptions 2014-05-01 14:32:54 +01:00
Alex Bilbie
6981ced972 Updated thrown exceptions 2014-04-25 11:24:48 +01:00
Alex Bilbie
019dfa8836 Updated thrown exceptions 2014-04-25 11:24:42 +01:00
Alex Bilbie
7f6ca35628 Updated exceptions 2014-04-25 11:24:33 +01:00
Alex Bilbie
e1a7f576e4 Moved exception code into new exception classes 2014-04-25 11:24:25 +01:00
Alex Bilbie
647de842ff Updated exceptions 2014-04-25 10:01:01 +01:00
Alex Bilbie
d7ddfe6452 Updated docblock 2014-04-06 22:01:56 +01:00
Alex Bilbie
5893ba4e8e Fixes #151 2014-04-06 21:08:35 +01:00
Alex Bilbie
b2c07aa68f Renamed method make to generate 2014-04-06 21:08:20 +01:00
Alex Bilbie
29b0389a75 PSR-4 baby! 2014-04-06 19:17:56 +01:00
Alex Bilbie
2aa318cfd7 AuthCode grant 2014-04-06 19:14:46 +01:00
Alex Bilbie
82f7c7abaf Removed unused method 2014-04-06 19:14:37 +01:00
Alex Bilbie
2d90540531 Spelling fix 2014-04-06 19:14:29 +01:00
Alex Bilbie
de681b1ebf RefreshToken is already taken so use RT 2014-04-06 19:14:16 +01:00
Joseph Deray
b12a1d84df added the ability to change the algorithm used to generate the token strings. added files missing in last commit 2014-03-11 12:41:21 -04:00
Joseph Deray
901aab9deb added the ability to change the algorithm used to generate the token strings 2014-03-11 12:39:09 -04:00
Alex Bilbie
9ac56ad547 Updated @link 2014-03-09 20:05:38 +00:00
Alex Bilbie
c60b29d201 First commit of AuthCode grant and entity 2014-03-09 20:03:05 +00:00
Alex Bilbie
2a524efff5 Bug fix 2014-03-09 20:02:22 +00:00
Alex Bilbie
22794d49d1 Removed old implicit grant 2014-03-09 19:35:53 +00:00
Alex Bilbie
4e37d9bb61 Updated Refresh Token and Password grants 2014-03-09 19:35:23 +00:00
Alex Bilbie
af06f9f3ea Updated copyright 2014-03-09 19:34:37 +00:00
Alex Bilbie
aef86227da Updated copyright 2014-03-09 19:34:23 +00:00
Phil Sturgeon
f83a9a7fa4 Support Authorization header passed as ENV var
Some hosts (at this point I only know of Fortrabbit) require Authorization headers to be passed as an environment variable, which PHP will then shove into . See more: http://fortrabbit.com/docs/essentials/quirks-and-constraints\#authorization-header
2014-02-26 17:28:17 -05:00
Alex Bilbie
d10cc5040d Inject server into storage 2014-02-24 16:50:19 +00:00
Alex Bilbie
468acbc369 Renamed Resource to ResourceServer 2014-02-24 14:43:26 +00:00
Alex Bilbie
013b1b53b4 Renamed Authorization to AuthorizationServer 2014-02-24 14:43:00 +00:00
Alex Bilbie
5254c9d225 Renamed Authorization to AuthorizationServer 2014-02-24 14:42:35 +00:00
Alex Bilbie
e4622b1f65 Check for headers only by default, also allow a token to be passed in 2014-01-17 17:17:13 +00:00
Alex Bilbie
c5f48782e6 $accessToken should be protected not public 2014-01-17 17:16:52 +00:00
Alex Bilbie
9de979a4ee Little bug fix 2014-01-17 10:37:05 +00:00
Alex Bilbie
20df1f50a6 Some initial grant testing 2014-01-17 10:36:57 +00:00
Alex Bilbie
11e0b004bd Numerous updates 2014-01-16 16:50:16 +00:00
Alex Bilbie
3cd5f50e64 Renamed Entities/ folder to Entity/ 2014-01-16 16:49:46 +00:00
Alex Bilbie
69571bc8ef Little fixes 2014-01-10 17:30:18 +00:00
Alex Bilbie
ca3b7d51df Added abstract server 2014-01-10 17:30:12 +00:00
Alex Bilbie
ac2beb08d6 Lots of logic implementation fixes 2014-01-10 12:30:13 +00:00
Alex Bilbie
0250d8d4d1 Too many changes to describe 2014-01-08 16:15:29 +00:00
Alex Bilbie
2d90a09f65 Scopes no longer have names 2013-12-31 15:36:02 +00:00
Alex Bilbie
e9d867ba95 Removed id property from token entities, just use token now 2013-12-31 15:35:51 +00:00
Alex Bilbie
2c732a6647 PHP error fix 2013-12-31 15:35:13 +00:00
Alex Bilbie
9d6ecfae46 Little changes 2013-12-26 20:22:31 +00:00
Alex Bilbie
a3863fec2e Updated authorisation server 2013-12-24 17:02:58 +00:00
Alex Bilbie
5cd420bd5d Updated resource server 2013-12-24 17:02:49 +00:00
Alex Bilbie
e62bc4e98d Updated storage interfaces 2013-12-24 17:02:34 +00:00
Alex Bilbie
7a38187076 Updated grants 2013-12-24 17:01:56 +00:00
Alex Bilbie
40490db27f Added ServerException 2013-12-24 17:01:29 +00:00
Alex Bilbie
bc74aff46d Added entities 2013-12-24 17:01:11 +00:00
Alex Bilbie
337cb088e9 Delete some old files we don't care about 2013-12-24 17:01:02 +00:00
Alex Bilbie
9e5bd4cd67 First commit of Session 2013-12-16 23:47:53 +00:00
Alex Bilbie
427ae50704 First commit of AccessToken 2013-12-16 23:47:47 +00:00
Alex Bilbie
449ba5005c First commit of updated ResourceServer 2013-12-16 23:47:03 +00:00
Anderson Müller
9b9cf79f39 Typo in docblock 2013-12-06 11:17:41 +01:00
Alex Bilbie
dba976d6ac Fixes #108, fixes #114 - ucfirst headers 2013-12-05 20:57:22 +00:00
Alex Bilbie
0db8850e81 Merge branch 'refs/heads/develop' into feature/no-inject-server
Conflicts:
	src/League/OAuth2/Server/Grant/GrantTrait.php
2013-12-05 20:28:31 +00:00
Alex Bilbie
262ce23fb9 No longer need to inject auth server into grant 2013-12-05 20:25:50 +00:00
Phil Sturgeon
1419ba8cdc Added GrantTrait::setIdentifier
I found it useful to be able to set the identifier so I could "alias" one for deprecation. Hopefully no issues here @alexbilbie
2013-12-04 17:23:19 -05:00
Alex Bilbie
031cf3064a Moved some grant related functions into a trait to reduce duplicate code 2013-12-02 18:42:54 +00:00
Alex Bilbie
5ec2c24b5c Removed build in DB providers, will be included in separate repos 2013-11-29 12:23:05 +00:00
Alex Bilbie
44408b873f Make sure $this is returned 2013-11-25 23:58:42 +00:00
jlehner
d3158a830b Update Implicit Grant Type with the following:
- Added accessTokenTTL variable and setter method
 - Updated response in the completeFlow method to include all required parameters per OAuth2 spec
 - completeFlow function accounts for local grant TTL override
2013-09-26 14:40:56 -04:00
Alex Bilbie
4a71c376b8 Merge branch 'refs/heads/master' into develop
Conflicts:
	.travis.yml
	README.md
2013-09-26 11:18:10 +01:00
Daniel Schniepp
23627c659e Fixed issues with returns and columns 2013-09-25 16:59:45 +02:00
Alex Bilbie
bee71c1e83 Merge pull request #94 from daveWid/request-interface-cleanup
Request interface cleanup
2013-09-08 03:23:26 -07:00
Alex Bilbie
ad97273455 Gave "bearer" a capital "B". Fixes #96 2013-09-07 18:00:13 +01:00
Alex Bilbie
0b55dc4c01 Gave "bearer" a capital "B" 2013-09-07 17:59:44 +01:00
Alex Bilbie
4985770d07 Gave "bearer" a capital "B" 2013-09-07 17:59:34 +01:00
Dave Widmer
a2bf4e0dfb Removing constructor and buildFromGlobals from RequestInterface. Fixes: #88 2013-09-06 09:14:24 -04:00
Matthew Hailwood
e5dc3001c4 Update ClientInterface.php 2013-09-04 12:43:12 +12:00
Matthew Hailwood
69531c3eb5 Adding auto_approve field to client details array. 2013-09-04 12:38:45 +12:00
Dave Widmer
69710a5909 Normalizing headers to a Ucfirst-With-Dashes format. 2013-08-20 11:40:02 -04:00
nhorvath
f612e105bd Update Implicit.php
Fix typo in class name. Change "Implict" to "Implicit"
2013-08-02 14:51:13 -04:00
Philip Brown
f1567df802 Set $grantType default 2013-07-17 11:40:06 +01:00
Alex Bilbie
307964d571 Fixed missing $this 2013-06-18 18:27:34 +01:00
Alex Bilbie
a1ca904255 Merge branch 'develop' of github.com:php-loep/oauth2-server into develop 2013-06-18 18:17:02 +01:00
Alex Bilbie
6e045afa26 Merge pull request #70 from gstjohn/master
Fix to docblocks
2013-06-08 04:28:34 -07:00
Garrett St. John
8f15158d1c Fix to docblocks 2013-06-06 14:00:17 -07:00
Garrett St. John
ca4e749986 Fix to docblocks 2013-06-06 13:09:15 -07:00
Jason Grimes
e5a48c929b Make determineAccessToken() public in order to check if an access token was sent before checking its validity. 2013-06-05 23:59:29 -04:00
Alex Bilbie
829cef936a mErge branch 'feature/fluent' into develop 2013-06-02 14:59:31 +01:00
Alex Bilbie
f78e05cb08 Anal space fixes 2013-06-02 14:59:05 +01:00
Alex Bilbie
0999bf4de3 Added missing functions 2013-06-02 14:58:59 +01:00
Alex Bilbie
e442253e26 Anal spacing fixes and removed PHP5.4+ specific array syntax 2013-06-02 14:58:52 +01:00
Alex Bilbie
4c4155fdac Added \Illuminate\Support\Facades\DB namespace 2013-06-02 14:54:49 +01:00
Alex Bilbie
d901e90602 Added \Illuminate\Support\Facades\DB namespace 2013-06-02 14:41:38 +01:00
Alex Bilbie
32a7ed38a9 Updated PSR compliance. Added Illuminate\Support\Facades\DB namespace 2013-06-02 14:40:59 +01:00
Alex Bilbie
9dec6c4bfe Added Doctrine/DBAL implementation of storage classes (thanks @inanimatt) 2013-06-02 14:25:06 +01:00
Alex McRoberts
a4a8f6e661 This fixes #57. By passing in a conditional flag refering to headersOnly, the library would stil respect RFC6749 Section 7 and RFC6750 Section 2. 2013-05-27 21:27:30 -07:00
Alex Bilbie
47c24e3181 Corrected array key call. Fixes #63 2013-05-27 20:33:07 +02:00
Alex Bilbie
4d36ebd3e7 Added namespaces 2013-05-14 09:50:40 +01:00
Alex Bilbie
0b3a9dc888 Converted PHP 5.4 array syntax to old-skool syntax 2013-05-14 09:46:14 +01:00
Alex Bilbie
1fcdbf45b2 Removed docblocks 2013-05-14 09:45:19 +01:00
Alex Bilbie
94a064e2f4 Added fluent storage from #54 2013-05-14 09:44:12 +01:00
Alex Bilbie
92b6ce3335 Added default value for final argument in ClientInterface::getClient(). Fixes #56 2013-05-14 09:00:36 +01:00
Alex Bilbie
ee9549287e Updated docblocks 2013-05-14 08:59:53 +01:00
Alex Bilbie
4b3e0bf668 Fixed semantic meaning of requireScopeParam() and requireStateParam() by changing their default value to true 2013-05-10 23:01:54 -07:00
Alex Bilbie
05d4b68586 Optimised regex and re-added trim() following conversation in #52 2013-05-10 23:00:47 -07:00
Alex Bilbie
ef4a138237 Fixed associateAuthCodeScope() query 2013-05-10 17:29:28 -07:00
Alex Bilbie
d531a37412 Don't add scope IDs 2013-05-10 17:26:23 -07:00
Alex Bilbie
ba2dc90f3b Altered associateScope logic 2013-05-10 17:08:20 -07:00
Alex Bilbie
7373f312da Updated variable name 2013-05-10 17:08:10 -07:00
Alex Bilbie
a01810d8fa Updated validateAuthCode in PDO Session 2013-05-10 17:07:29 -07:00
Alex Bilbie
3ea3eb5ebd Implemented getAuthCodeScopes() in PDO Session 2013-05-10 17:07:06 -07:00
Alex Bilbie
11022e16ef Updated validateAuthCode() in SessionInterface 2013-05-10 17:06:44 -07:00
Alex Bilbie
8d06a7b685 Updated getAuthCodeScopes() in SessionInterface 2013-05-10 17:06:05 -07:00
Alex Bilbie
c66c8092f9 Revert "Return the session_id for validateAuthCode instead of an array"
This reverts commit 51138f8738.
2013-05-10 16:57:39 -07:00
Alex Bilbie
591139f44d Added associateAuthCodeScope to PDO 2013-05-10 16:57:18 -07:00
Alex Bilbie
410ad09b5c Updated PDO associateAuthCode 2013-05-10 16:56:38 -07:00
Alex Bilbie
51138f8738 Return the session_id for validateAuthCode instead of an array 2013-05-10 16:53:52 -07:00
Alex Bilbie
aa8d38108f Associate scopes to auth codes in separate method. Creating an auth code now returns an ID 2013-05-10 16:53:21 -07:00
Alex Bilbie
9372cc85d0 Added getAuthCodeScopes() method 2013-05-10 16:50:34 -07:00
Alex Bilbie
accb80289f Added associateAuthCodeScope() method 2013-05-10 16:50:13 -07:00
Alex Bilbie
ce51821043 If rotateRefreshTokens() is true then associate new access tokens 2013-05-10 16:13:06 -07:00
Alex Bilbie
eac33d50b3 Added missing semicolon 2013-05-10 16:12:43 -07:00
Alex Bilbie
2552b73b17 Added rotateRefreshTokens() method 2013-05-10 16:00:40 -07:00
Alex Bilbie
8c4019693b Updated @ziege's patch to overcome awkward access token definition requirement (i.e. access token can have a space in it) and also optimised code. Fixes #52 2013-05-10 12:57:34 -07:00
ziege
b88ef82563 Fixed two probems in access token check
1) The method returned the wrong result in case when the access token itself contained the string "Bearer".

2) When using cURL, the request is sometimes send twice (in my case when the first request returned a 404 error), and the Authorization header of the second request is doubled, so that you get a "Authorization: Bearer XXX, Bearer XXX". This case is checked now. (BTW: Tested with the current PHP version 5.4.15 on Windows.)
2013-05-10 20:00:01 +02:00
Alex Bilbie
41a7125370 Accidentally used PHP 5.4 style bracket 2013-05-09 11:48:21 -07:00
Alex Bilbie
f4bcfee687 Update associated scopes if requested in refresh access token. Fixes #47 2013-05-09 11:42:28 -07:00
Alex Bilbie
6d8eb9d05e Added removeRefreshToken method to SessionInterface 2013-05-09 11:40:29 -07:00
Alex Bilbie
76f2f6a5e1 Don't delete old sessions when issuing new access tokens using the Password or Client Credential grants. Fixes #32 2013-05-09 10:43:44 -07:00
Alex Bilbie
d677b765b2 Renamed scopes.key to scopes.scope. Updated ScopeInterface and PDO/Scope. Fixes #45 2013-05-09 10:23:41 -07:00
Alex Bilbie
7035792325 Allow for multiple default scopes. Fixes #42 2013-05-09 10:15:36 -07:00
Alex Bilbie
351c2e97ea If scope parameter is required and there are not requested scopes AND there is no default scope set then fail
Should have been included in with previous commit
2013-05-09 10:06:44 -07:00
Alex Bilbie
ddefb2ee16 Set the scope parameter to not be required by default. Fixes #43 2013-05-09 10:02:41 -07:00