Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from eve import Eve
- from eve.auth import BasicAuth
- import os
- class MyBasicAuth(BasicAuth):
- def check_auth(self, username, password, allowed_roles, resource):
- return username == 'user' and password == 'user'
- #return true
- #app = Eve()
- if __name__ == '__main__':
- port = int(os.environ.get('PORT', 5000))
- app = Eve(auth=MyBasicAuth, settings='settings.py')
- app.run(host='192.168.1.149', port=port)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement