Skip to content

Add dirtiness check for refresh token#15

Merged
bachya merged 4 commits intodevfrom
token-change
Oct 5, 2018
Merged

Add dirtiness check for refresh token#15
bachya merged 4 commits intodevfrom
token-change

Conversation

@bachya
Copy link
Copy Markdown
Owner

@bachya bachya commented Oct 5, 2018

Describe what the PR does:

This PR adds the ability to check the "dirtiness" of the refresh token (i.e., whether it has been changed or not). This allows applications that store refresh tokens to a filesystem, database, etc. to not constantly:

  1. Read from the filesystem/DB
  2. Determine whether the refresh token has changed
  3. Save the new one to the filesystem/DB

Since the token won't change a large portion of the time, this is wasteful. Instead, at any point, library users can check for themselves:

system.api.refresh_token_dirty
# >>> True

Note that this does create something of an observer effect: by viewing the dirtiness property, we automatically reset it to False.

Does this fix a specific issue?

N/A

Checklist:

  • Confirm that one or more new tests is written for the new functionality.
  • Update README.md with any new documentation.
  • Run tests and ensure 100% code coverage: make coverage (after running make init)
  • Ensure you have no linting errors: make lint (after running make init)
  • Ensure you have no typed your code correctly: make typing (after running make init)
  • Add yourself to AUTHORS.md.

@bachya bachya self-assigned this Oct 5, 2018
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 5, 2018

Codecov Report

Merging #15 into dev will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@         Coverage Diff         @@
##            dev    #15   +/-   ##
===================================
  Coverage   100%   100%           
===================================
  Files         5      5           
  Lines       259    271   +12     
===================================
+ Hits        259    271   +12
Impacted Files Coverage Δ
simplipy/api.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ddc2bb0...d42e0ed. Read the comment docs.

@bachya bachya merged commit c8888b8 into dev Oct 5, 2018
@bachya bachya deleted the token-change branch October 5, 2018 17:32
@github-actions github-actions bot locked and limited conversation to collaborators Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant