-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from cterrazas2/token-response-object
Token scheduler added.
- Loading branch information
Showing
19 changed files
with
353 additions
and
210 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Token Scheduler | ||
|
||
## Least Privilege | ||
|
||
`pyvet` uses the principle of | ||
[least privilege](https://en.wikipedia.org/wiki/Principle_of_least_privilege) | ||
when interacting with various VA apis. A veteran must initially request and | ||
authorize access for each api and then `pyvet` will place the bearer token in a | ||
cache. | ||
|
||
Below is an example of the token cache for a va api | ||
name and its token, or key value pair respectively. | ||
|
||
```python3 | ||
{ | ||
'veteran': 'somerandomtoken', | ||
'claims': 'somerandomtoken', | ||
... | ||
} | ||
``` | ||
|
||
### Eviction Policy | ||
|
||
The token cache will be updated on initial entry of a bearer token and then | ||
once it becomes invalid (expired or revoked). The refresh token will be used | ||
to retrieve another token. If the refresh token is expired, then the entire | ||
authentication process is initiated for the veteran's approval. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.