Commit graph

85 commits

Author SHA1 Message Date
Josh Sherman
35af1f4037 Merge branch '2.0' of git://github.com/picklesphp/pickles into 2.0
Conflicts:
	src/OAuth2/SessionStorage.php
2014-10-16 07:32:06 -04:00
Josh Sherman
a40041acc6 Implemented refresh tokens
Right now it's hardcoded to always return a refresh token when you issue an
access token. Should think about making this an optional workflow or committing
to it being turned on indefinitely.
2014-10-16 07:30:32 -04:00
Josh Sherman
9e2e4f75f3 Tweaked schema some more. 2014-10-15 07:56:25 -04:00
Josh Sherman
f235f4a520 Tweaking the schema 2014-10-15 07:48:34 -04:00
Josh Sherman
dc06f37320 Updated the interfaces and dropped oauth version
Seems the oauth lib's stable version is 3.2, dropped down from the 4 version
to that.
2014-10-14 22:05:52 -04:00
Josh Sherman
c244e02d46 Implementing storage interfaces 2014-10-14 07:11:03 -04:00
Josh Sherman
49a713eb35 Finished up password grant 2014-10-13 22:50:43 -04:00
Josh Sherman
ec14621e7c Tweaked unit tests 2014-10-13 21:46:34 -04:00
Josh Sherman
8e9c644822 Working out the routing 2014-10-13 21:27:19 -04:00
Josh Sherman
75596ed725 Moved to new namespace 2014-10-12 21:53:15 -04:00
Josh Sherman
2ec85c469b Working on that OAuth2 2014-10-12 21:20:48 -04:00
Josh Sherman
a834692235 Stubbed out storage classes 2014-10-11 07:40:09 -04:00
Josh Sherman
4a8378c6c2 Merge branch '2.0' of github.com:picklesphp/pickles into 2.0 2014-10-08 21:48:01 -04:00
Josh Sherman
aa8c86e5c2 Working on oauth 2014-10-08 21:37:22 -04:00
Josh Sherman
840a68961c Cleaned up some double ;; 2014-10-07 12:10:46 -04:00
Josh Sherman
8e60e9d553 Dropped date utility class
Only had one function and it was referencing the time class. Moved date tests
to the time tests because it seemed like a more comprehensive set of tests.
2014-10-07 09:33:21 -04:00
Josh Sherman
e45e1251e1 Added auth test, cleaned up directory 2014-10-04 07:24:57 -04:00
Josh Sherman
a866a1a61b Merge branch 'master' into 2.0 2014-10-03 11:08:50 -04:00
Josh Sherman
2df1a5a162 Updated project name 2014-10-03 11:06:16 -04:00
Josh Sherman
ae98b67683 Cleaned up headers 2014-10-03 10:46:43 -04:00
Josh Sherman
84a785d4c9 Added Basic Auth functionality 2014-10-03 07:30:10 -04:00
Josh Sherman
31f4c32fb0 Reworked test to check for PHP version
`password_hash` is PHP 5.5. Instead of adding the sanity check in the code,
I've opted to put it in the test to ditch the overhead of having to make that
check for every request.
2014-10-02 21:34:09 -04:00
Josh Sherman
1b365bcff0 Added root namespace to function
Tests were failing on 5.4 out on travis. Was barking about the function not
existing in the namespace. Hoping this resolves it.
2014-10-02 21:18:36 -04:00
Josh Sherman
4167d99623 Fixed deleting a file
Not sure when this became an issue, but attempting to delete a file that ends
with / will result in an error on OS X
2014-10-02 18:15:48 -04:00
Josh Sherman
07ed22c58f Fixed up resource class' tests 2014-10-02 07:02:29 -04:00
Josh Sherman
173136ddce Finished up Profiler and test coverage 2014-10-02 06:42:16 -04:00
Josh Sherman
9e65b2cfc2 Spruced up profiler, need to finish up tests 2014-10-01 22:08:11 -04:00
Josh Sherman
ee8bd63a08 Working on that new profiler
Gotta figure out what's going on with the database portion, it's going all
crazy on me.
2014-10-01 07:41:01 -04:00
Josh Sherman
506ff1fd45 Unit tests for the Object class 2014-09-30 22:24:10 -04:00
Josh Sherman
88a4375dd5 Wrapped up unit tests on Config class 2014-09-30 15:58:16 -04:00
Josh Sherman
725d952192 Reworked config class, working on unit tests 2014-09-30 07:21:52 -04:00
Josh Sherman
52c8a730f3 Dropped pickles.ph made some assumptions
Wanted to be 100% reliant on the autoloader so I dropped the manual include of
pickles.php. Also moved some of the PHP ini logic out of here and baked in
some assumptions about environments and settings. Basically anything other than
"production" will set display errors to true, production is false.
2014-09-29 22:07:18 -04:00
Josh Sherman
1c974fc9ad Reworked config to be an arrayobject
Death to the mix of object variable and array. Also cleaned up the profiler
sanity checks as the variable will always be present now. Profiler is now an
all or nothing action.
2014-09-29 21:32:08 -04:00
Josh Sherman
aea1bae3bf Working on tests for Resource 2014-09-28 21:49:49 -04:00
Josh Sherman
6c173cdc89 Working on tests for the Resource class.
Got a bunch more validation rules to port over.
2014-09-28 09:47:54 -04:00
Josh Sherman
3b8eddc7b5 Dropped status code method
The function `http_response_code` was added in PHP 5.4 which deprecated the
code I had written. Dropped functionality and tests and updated code to use the
new function.
2014-09-28 08:36:14 -04:00
Josh Sherman
da379d0849 Knocked out unit tests for the new Router 2014-09-28 08:24:02 -04:00
Josh Sherman
0cfc2c7979 Moved tests and updated to use namespaces 2014-09-28 07:31:02 -04:00
Josh Sherman
302f400dcb Removed some leftover debug code 2014-09-28 06:51:35 -04:00
Josh Sherman
4af10e0fb6 Cleaning up a bit
The plan is to drop this file entirely and move the logic off to the config
class itself which will be instantiated by the router.
2014-09-27 22:36:03 -04:00
Josh Sherman
79f8da8c45 Namespaced the fuck out of Pickles 2014-09-27 22:28:15 -04:00
Josh Sherman
48c5289060 Moved files and added namespaces 2014-09-27 17:57:07 -04:00
Josh Sherman
8a1ac4fb47 Worked through basic authentication 2014-09-27 16:40:41 -04:00
Josh Sherman
718f8d64bb Working on basic auth and dropped log class
I personally haven't used it in years so I'm just getting to the mindset that
it's not a very useful piece of functionality. Nginx can easily log all of your
requests and any time I need to troubleshoot SQL (not all that often) I do it
directly without using the class.
2014-09-27 15:37:41 -04:00
Josh Sherman
bdb4ca8ff0 Renamed secure flag to https 2014-09-27 14:02:52 -04:00
Josh Sherman
53d8ab1137 Added powered by pickles header 2014-09-27 14:01:04 -04:00
Josh Sherman
20aff31b94 Moved validate logic into resource
I couldn't find a single scenario where I was using the Validate class in my
site level code. Dropped the overhead of calling a static class method multiple
times on a page by moving the logic in the Resource class. Also changed the
response to always return the errors as parameter => array. This allows a
developer to choose if they want to display one error or all of the errors.
2014-09-27 12:06:33 -04:00
Josh Sherman
50ea072929 Added password_hash filter
Defaulting to PASSWORD_DEFAULT, will expand to other options if the need arises.
2014-09-27 11:47:29 -04:00
Josh Sherman
3861bfc571 Dropped the filter class
Will revisit if there's ever a need to have access to it directly. Until then
it will find it in the Resource class.
2014-09-27 11:33:53 -04:00
Josh Sherman
141ac693cb Dropped response class
Seems pointless to have class that had a single method that basically contained
all of the shit that the resource already had and knew. Moved respond() method
to the response class and moved all of the response validation logic and errors
from the router to the response class.
2014-09-27 11:25:45 -04:00