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 toArray api to access token #928

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hendeavors
Copy link
Contributor

I think this allows some flexibility when working with values provided by the access token. Sometimes it is easier or necessary to pass an array of what the access token provides. I know jsonSerialize provides this already but it doesn't feel right to execute this method for the purposes of working with an array explicitly.

Added an additional interface to avoid a BC for the current release, although I think it would be proper to include the functionality in the next major release.

@codecov
Copy link

codecov bot commented Dec 7, 2021

Codecov Report

Merging #928 (b83f33a) into master (77def43) will not change coverage.
The diff coverage is 100.00%.

❗ Current head b83f33a differs from pull request most recent head c28e518. Consider uploading reports for the commit c28e518 to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##              master      #928   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity       180       181    +1     
===========================================
  Files             20        20           
  Lines            464       430   -34     
===========================================
- Hits             464       430   -34     
Impacted Files Coverage Δ
src/Token/AccessToken.php 100.00% <100.00%> (ø)
src/Grant/Password.php 100.00% <0.00%> (ø)
src/Grant/GrantFactory.php 100.00% <0.00%> (ø)
src/Grant/RefreshToken.php 100.00% <0.00%> (ø)
src/Tool/RequestFactory.php 100.00% <0.00%> (ø)
src/Grant/AuthorizationCode.php 100.00% <0.00%> (ø)
src/Provider/GenericProvider.php 100.00% <0.00%> (ø)
src/Provider/AbstractProvider.php 100.00% <0.00%> (ø)
src/Tool/ProviderRedirectTrait.php 100.00% <0.00%> (ø)
... and 1 more

Copy link
Contributor

@ramsey ramsey left a comment

Choose a reason for hiding this comment

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

This looks good to me. Please provide a test.

@hendeavors
Copy link
Contributor Author

This looks good to me. Please provide a test.

Test added.

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