-
Notifications
You must be signed in to change notification settings - Fork 0
feat: adds user authentication #218
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
da76704
feat: fixes commit error
yosefmaru 57b3394
feat: adds venv and .venv to flake8 exclude list
yosefmaru 96b2fb7
feat: adds authlib library to dependency list
yosefmaru 6e61d16
feat: adds authentication flow for /job_params route
yosefmaru 1449b87
feat: removes commented line
yosefmaru 9862077
feat: sets secret_key to None
yosefmaru 89c5724
ci: adds admin page for authenticated users
yosefmaru 060c9cd
feat: adds an admin html script
yosefmaru 0a709a3
feat: adds a response json resource for testing
yosefmaru 05123c4
feat: adds functions for testing authentication
yosefmaru 42fc55f
feat: fixes incorrect merge conflict resolution
yosefmaru a95734d
feat: adds test scripts and test resources
yosefmaru e20efd1
Merge branch 'dev' into feat-3-user-authentication
helen-m-lin 2682be5
docs: local env setup
helen-m-lin 9e8c9f9
fix: run linters
helen-m-lin ca2b86b
revert: do not require signin for Job Params page
helen-m-lin d24c537
fix: check userinfo to avoid infinite loop
helen-m-lin 01cf8ed
feat: Admin page
helen-m-lin 816f7db
feat: workaround for local auth
helen-m-lin e80104d
feat: logout
helen-m-lin 2f1f5dd
Merge branch 'dev' into feat-3-user-authentication
helen-m-lin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
|
@@ -3,5 +3,7 @@ exclude = | |
.git, | ||
__pycache__, | ||
build, | ||
venv, | ||
.venv | ||
env | ||
max-complexity = 10 |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,36 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script> | ||
<title>{% block title %} {% endblock %} AIND Data Transfer Service Admin</title> | ||
<style> | ||
body { | ||
margin: 20px; | ||
font-family: arial, sans-serif; | ||
} | ||
nav { | ||
height: 40px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<nav> | ||
<a href="/">Submit Jobs</a> | | ||
<a href="/jobs">Job Status</a> | | ||
<a href="/job_params">Job Parameters</a> | | ||
<a title="Download job template as .xslx" href="/api/job_upload_template" download>Job Submit Template</a> | | ||
<a title="List of project names" href="{{ project_names_url }}" target="_blank">Project Names</a> | | ||
<a title="For more information click here" href="https://aind-data-transfer-service.readthedocs.io" | ||
target="_blank">Help</a> | | ||
<a href="/admin">Admin</a> | | ||
<a href="/logout">Log out</a> | ||
</nav> | ||
<div> | ||
<h3>Admin</h3> | ||
<div>Hello {{user_name}}, welcome to the admin page</div> | ||
<div>Email: {{user_email}}</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,19 @@ | ||
{ | ||
"ARN": "arn_value", | ||
"Name": "secret_name", | ||
"VersionId": "version_id", | ||
"SecretString": "{\"CLIENT_ID\":\"client_id\",\"CLIENT_SECRET\":\"client_secret\",\"AUTHORITY\":\"https://authority\"}", | ||
"VersionStages": ["AWSCURRENT"], | ||
"CreatedDate": "2025-04-15T16:44:07.279000Z", | ||
"ResponseMetadata": { | ||
"RequestId": "request_id", | ||
"HTTPStatusCode": 200, | ||
"HTTPHeaders": { | ||
"x-amzn-requestid": "2b090d64-c92d-48c5-a43a-abf5696c815e", | ||
"content-type": "application/x-amz-json-1.1", | ||
"content-length": "748", | ||
"date": "Wed, 23 Apr 2025 21:19:04 GMT" | ||
}, | ||
"RetryAttempts": 0 | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.