Skip to content

Commit

Permalink
huge refactor, better everything
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpricethesecond committed Feb 5, 2024
1 parent 02d6050 commit 4413109
Show file tree
Hide file tree
Showing 7 changed files with 240 additions and 782 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ Breaking Changes:
- auth flow has been reworked to allow for v5 endpoints - users will need to refresh their auth tokens

New features:
- created functional tests - unit tests were inadequate for certain functions
- created functional tests - unit tests were inadequate for certain functions. These must be run from inside the container
- better handling of personal connect endpoints
- initial support for additional consent auth flow
- initial support for consent management
- more descriptive response codes for several endpoints

Bug fixes:
- catch consent required errors instead of returning a 500 code
Expand Down
7 changes: 4 additions & 3 deletions service/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

# from service.controllers import AuthURLResource, TokensResource
# from service.controllers import *
from controllers import *
from service.controllers_old import *
from controllers.ops import OpsResource as _OpsResource
# from service import app
app = Flask(__name__)
app.secret_key = os.urandom(16)
Expand All @@ -32,13 +33,13 @@ def __init__(self, url_map, *items):
api.add_resource(AuthURLResource, '/v3/globus-proxy/auth/url/<client_id>')
api.add_resource(TokensResource, '/v3/globus-proxy/auth/tokens/<client_id>/<session_id>/<auth_code>')
api.add_resource(CheckTokensResource, '/v3/globus-proxy/auth/check_tokens/<endpoint_id>')
api.add_resource(OpsResource, '/v3/globus-proxy/ops/<client_id>/<endpoint_id>/<regex("(.*)"):path>')
# api.add_resource(OpsResource, '/v3/globus-proxy/ops/<client_id>/<endpoint_id>/<regex("(.*)"):path>')
api.add_resource(_OpsResource, '/v3/globus-proxy/ops/<client_id>/<endpoint_id>/<regex("(.*)"):path>')

# transfer resourced are separated due to inconsistent url pattern
api.add_resource(TransferResource, '/v3/globus-proxy/transfers/<client_id>')
api.add_resource(ModifyTransferResource, '/v3/globus-proxy/transfers/<client_id>/<task_id>')


# Health checks
api.add_resource(ReadyResource, '/v3/globus-proxy/ready')
api.add_resource(HealthcheckResource, '/v3/globus-proxy/healthcheck')
Expand Down
Loading

0 comments on commit 4413109

Please sign in to comment.