Basecode for CI-Connect Branded Web Portals.
This repository contains the base code for the CI-Connect branded portal applications. The "Portal," utilizes Globus in order to to authenticate users with Auth. All of the Portal code can be found in the portal/ directory.
- Visit the Globus Developer Pages to register an App.
- If this is your first time visiting the Developer Pages you'll be asked to create a Project. A Project is a way to group Apps together.
- When registering the App you'll be asked for some information, including the redirect URL and any scopes you will be requesting.
- Redirect URL:
https://localhost:5000/authcallback(note: if using EC2localhostshould be replaced with the IP address of your instance). - Scopes:
urn:globus:auth:scope:transfer.api.globus.org:all,openid,profile,email
- Redirect URL:
- After creating your App the client id and secret can be copied into this project in the following two places:
portal/portal.confin thePORTAL_CLIENT_IDandPORTAL_CLIENT_SECRETproperties.service/service.confwhere thePORTAL_CLIENT_IDis used to validate the access token that the Portal sends to the Service.
sudo easy_install pipsudo pip install virtualenvsudo mkdir ~/projectscd ~/projectsgit clone https://github.com/maniaclab/ciconnect-portalcd ciconnect-portalvirtualenv venvsource venv/bin/activatepip install -r requirements.txt- Note that current
portal.conffile located inciconnect-portal/portal/portal.confis the default .conf file from the Globus Developer Portal and will need to be updated to include correct API keys.
cd ~/projectsgit clone https://github.com/maniaclab/ciconnect-portal-markdowns- Make a copy of one of the branded markdown directories, label it as localhost:5000 or your local webserver
cp -R psdconnect.uchicago.edu/ localhost\:5000/
cd ~/projects/ciconnect-portal./run_portal.py- point your browser to
https://localhost:5000
All code pertaining to individual branded portals is located in /portal/templates/scripts.html. This file handles stylistic differences between the portals, mainly pertaining to google analytics, nav-header menus, and branded images.
Update /run_portal.py file to match below:
#!/usr/bin/env python
from portal import app
if __name__ == '__main__':
app.run(host='localhost',
ssl_context=('./ssl/server.crt', './ssl/server.key'))