<commit_before>OAuth Provider
==============

This repository offers an abstraction around PECL's OAuth class which makes it even more easy to setup an OAuth Provider.
If you want to start using this immediately, simply follow the minimal setup instructions. If you want to
adapt the code to suit your own datastore or framework check the customizing section.


Notes
=====

This OAuth provider is setup as an OAuth v1.0a provider. OAuth 2.0 is currently not taken into account.


Minimal setup instructions
==========================

1. Import the table definitions from the file lib/tables.sql in your database.
2. Setup the endpoint scripts in your own application
3. Setup the authorize page (simple example provided in the main folder, see authorize.php)
4. Implement oauth at the API call (simple example provided in the main folder, see api.php)


Customizing
===========

NB: This section is here purely to have the example work with the database abstraction of your choice. If you want to take this
repositories code and use it in a live implementation you're by all means welcome, but you need to use you're common sense to
change the code to fit inside your application.

1. Setup/create your own schemes. Take into account that you need to cover all fields of all models
2. overwrite the CRUD methods of all models. Also overwrite (because these 3 factory methods and the checking method also interact directly with the DataStore):
 * OAuthAccessTokenModel::loadFromToken
 * OAuthRequestTokenModel::loadFromToken
 * OAuthAccessTokenModel::loadFromConsumerKey
 * OAuthAccessTokenModel::nonceExists
<commit_msg>Update README.markdown<commit_after>OAuth Provider
==============

This repository offers an abstraction around PECL's OAuth class which makes it even more easy to setup an OAuth Provider.
If you want to start using this immediately, simply follow the minimal setup instructions. If you want to
adapt the code to suit your own datastore or framework check the customizing section.

There now is a couchbase version in the couchbase branch. I did not create, neither test this but feel free to experiment with this if you like.


Notes
=====

This OAuth provider is setup as an OAuth v1.0a provider. OAuth 2.0 is currently not taken into account.


Minimal setup instructions
==========================

1. Import the table definitions from the file lib/tables.sql in your database.
2. Setup the endpoint scripts in your own application
3. Setup the authorize page (simple example provided in the main folder, see authorize.php)
4. Implement oauth at the API call (simple example provided in the main folder, see api.php)


Customizing
===========

NB: This section is here purely to have the example work with the database abstraction of your choice. If you want to take this
repositories code and use it in a live implementation you're by all means welcome, but you need to use you're common sense to
change the code to fit inside your application.

1. Setup/create your own schemes. Take into account that you need to cover all fields of all models
2. overwrite the CRUD methods of all models. Also overwrite (because these 3 factory methods and the checking method also interact directly with the DataStore):
 * OAuthAccessTokenModel::loadFromToken
 * OAuthRequestTokenModel::loadFromToken
 * OAuthAccessTokenModel::loadFromConsumerKey
 * OAuthAccessTokenModel::nonceExists

{'fraction_non_alphanumeric': 0.06531332744924978, 'fraction_numerical': 0.006472491909385114, 'mean_word_length': 4.811965811965812, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '296434', 'n_tokens_mistral': 842, 'n_tokens_neox': 788, 'n_words': 488}