These changes are required to have a smoother interaction with the front-end client. I also think the changes to how access_tokens is managed is better as tokens have validity periods.
In the event of expiry or renewal, a user will have to redeploy the API which can be unnecessary work.
List of updates:
Modified the GitHub operation class to take an extra initialization parameter access_token to aid with deployments from the Frontend.
Created the WriteRego class to take access tokens from the request header itself and carry out GitHub operations from the client without hassle.
Created the routes.py file to house the policy route paths. I also made temp changes to the operations. Now, access_tokens will be passed from the dependency before any GitHub operation can take place.
Modified the authorization and authentication settings.
The verify_token method returns the token as well as the user data from the API.
Updated each field to perform CRUD operations on the appropriate owner.
Modified the CRUD routes to include the owner field.
Added the owner field to the Rule object.
Update README and removed redundant values from example config.
These changes are required to have a smoother interaction with the front-end client. I also think the changes to how
access_tokens
is managed is better as tokens have validity periods.In the event of expiry or renewal, a user will have to redeploy the API which can be unnecessary work.
List of updates:
access_token
to aid with deployments from the Frontend.routes.py
file to house the policy route paths. I also made temp changes to the operations. Now, access_tokens will be passed from the dependency before any GitHub operation can take place.verify_token
method returns the token as well as the user data from the API.owner
field.owner
field to the Rule object.