Coder Social home page Coder Social logo

eve-oauth2's People

Contributors

nicolaiarocci avatar pedro2555 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

eve-oauth2's Issues

get token error

โžœ eve-oauth2 git:(master) โœ— curl -k -X POST -d "client_id=o0DKRNzRNJouovo2oJupkto8jDFwa6NouU7cOQ5N&grant_type=password&username=janreyho&password=123456" https://localhost:5000/oauth/token

<title>500 Internal Server Error</title>

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

TypeError: can't pickle _thread.lock objects

Following the existing example using eve-oauth2, I'm unable to get it to work as intended.

My requirements.txt contains the following:
eve
redis==2.10.6
oauthlib==2.1.0
requests-oauthlib==1.1.0
cryptography==2.5
flask-pymongo==0.5.2
werkzeug==0.14
flask-sentinel

When I run run.py I get the following error:

Traceback (most recent call last): File "server.py", line 24, in <module> app = Eve(settings='settings.py',auth=BearerAuth) File "C:\Program Files\Continuum\Anaconda3\envs\eve\lib\site-packages\eve\flaskapp.py", line 197, in __init__ self.register_resource(resource, settings) File "C:\Program Files\Continuum\Anaconda3\envs\eve\lib\site-packages\eve\flaskapp.py", line 983, in register_resource self.config["DOMAIN"][resource] File "C:\Program Files\Continuum\Anaconda3\envs\eve\lib\copy.py", line 155, in deepcopy y = copier(x, memo) File "C:\Program Files\Continuum\Anaconda3\envs\eve\lib\copy.py", line 243, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "C:\Program Files\Continuum\Anaconda3\envs\eve\lib\copy.py", line 182, in deepcopy y = _reconstruct(x, rv, 1, memo) File "C:\Program Files\Continuum\Anaconda3\envs\eve\lib\copy.py", line 297, in _reconstruct state = deepcopy(state, memo) File "C:\Program Files\Continuum\Anaconda3\envs\eve\lib\copy.py", line 155, in deepcopy y = copier(x, memo) File "C:\Program Files\Continuum\Anaconda3\envs\eve\lib\copy.py", line 243, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "C:\Program Files\Continuum\Anaconda3\envs\eve\lib\copy.py", line 182, in deepcopy y = _reconstruct(x, rv, 1, memo) File "C:\Program Files\Continuum\Anaconda3\envs\eve\lib\copy.py", line 297, in _reconstruct state = deepcopy(state, memo) File "C:\Program Files\Continuum\Anaconda3\envs\eve\lib\copy.py", line 155, in deepcopy y = copier(x, memo) File "C:\Program Files\Continuum\Anaconda3\envs\eve\lib\copy.py", line 243, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "C:\Program Files\Continuum\Anaconda3\envs\eve\lib\copy.py", line 182, in deepcopy y = _reconstruct(x, rv, 1, memo) File "C:\Program Files\Continuum\Anaconda3\envs\eve\lib\copy.py", line 297, in _reconstruct state = deepcopy(state, memo) File "C:\Program Files\Continuum\Anaconda3\envs\eve\lib\copy.py", line 155, in deepcopy y = copier(x, memo) File "C:\Program Files\Continuum\Anaconda3\envs\eve\lib\copy.py", line 243, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "C:\Program Files\Continuum\Anaconda3\envs\eve\lib\copy.py", line 174, in deepcopy rv = reductor(4) TypeError: can't pickle _thread.lock objects

Appreciate your help!

Does not seem to currently work with either Python2 or Python3

I was trying to run this example and received a few errors:

  1. in run.py had to change "from flask.ext.sentinel " to
from flask_sentinel import ResourceOwnerPasswordCredentials, oauth
  1. in oauth2.py had to add:
import os
from redis.connection import ConnectionPool
  1. I have also added this config setting. Seems pymongo will only use a URI now:
SENTINEL_MONGO_URI = 'mongodb://oauth2:[email protected]/mydb?authSource=mydb'
  1. I had to modify the flask-sentinel project as well. The config_prefix is no longer valid with pymongo. The flask_sentinel.py:

from:

mongo.init_app(app, config_prefix='SENTINEL_MONGO')

to

mongo.init_app(app)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.