Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add PDO storage support for refresh tokens #9

Closed
wants to merge 2 commits into from
Closed

add PDO storage support for refresh tokens #9

wants to merge 2 commits into from

Conversation

dsquier
Copy link
Contributor

@dsquier dsquier commented Nov 29, 2012

  • Included OAuth2_Storage_RefreshTokenInterface and functions for PDO
    support of refresh_tokens
  • Renamed table vars in config array

Resubmitting with only the refresh token addition. Figured out the Travis-Cl stuff (neat!) and it passed.

- Included OAuth2_Storage_RefreshTokenInterface and functions for PDO
support of refresh_tokens
- Renamed table vars in config array

public function unsetRefreshToken($refresh_token)
{
unset($this->refreshTokens[$refresh_token]);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not valid for the PDO storage engine. This should issue a delete statement

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for catching that. Submitted commit to fix.

unsetRefreshToken was not properly defined and therefore would not
delete a refresh_token when consumed.
@bshaffer
Copy link
Owner

Okay a couple more things...

  1. This would better be merged into the develop branch, as you are changing the passed configuration values to PDO, which will break backwards compatibility
  2. the setRefreshTokens function is not necessary

Also... why did you decide to change the config value names? I'm guessing for brevity?

@dsquier
Copy link
Contributor Author

dsquier commented Nov 30, 2012

For #1-- gotcha and will do.

For #2-- will remove.

As to the config value changes-- they stemmed from the new value needed to store the refresh token table. Initially, I used "refresh_token_table_name" and renamed "token_table_name" to "access_token_table_name", but felt those were a getting a bit longer than necessary and figured "_name" could be dropped without loosing meaning.

@dsquier
Copy link
Contributor Author

dsquier commented Nov 30, 2012

Closing this request. Will resubmit to merge with development branch.

@dsquier dsquier closed this Nov 30, 2012
@seakk seakk mentioned this pull request Nov 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants