Giter Site home page Giter Site logo

django-centralauth's People

Contributors

lenarother avatar stephrdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

django-centralauth's Issues

Access token lifetime

Please check if we can do without storing the access token lifetime. Maybe oauthlib / requests-oauthlib makes this obsolete anyway.

Log out user if access token is invalid

In the middleware, we check the validity of the access token. If the token is expired, we redirect to login via centralauth but not logging out the user. This needs to be added.

sync_perms fails upon removing perms from project

Traceback (most recent call last):
  File "/usr/local/bin/django-admin.py", line 5, in <module>
    management.execute_from_command_line()
  File "/usr/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 345, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.4/site-packages/django/core/management/base.py", line 348, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.4/site-packages/raven/contrib/django/management/__init__.py", line 41, in new_execute
    return original_func(self, *args, **kwargs)
  File "/usr/local/lib/python3.4/site-packages/django/core/management/base.py", line 399, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.4/site-packages/centralauth/client/management/commands/sync_perms.py", line 22, in handle
    response_json = response.json()
  File "/usr/local/lib/python3.4/site-packages/requests/models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.4/site-packages/simplejson/__init__.py", line 518, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.4/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.4/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 5 column 1 (char 4)
Sentry is attempting to send 1 pending error messages

Sync users feature

Add sync_users or improve sync_perms command to enable creating users in project through centralauth so that they appear in project admin even if they have no permissions.

Tests failing after oauthlib v3.0.0 release

    response = client.get(redirect, secure=True)
../../.virtualenvs/django-centralauth-8xEOLZjf/lib/python3.6/site-packages/django/test/client.py:527: in get
    response = super().get(path, data=data, secure=secure, **extra)
../../.virtualenvs/django-centralauth-8xEOLZjf/lib/python3.6/site-packages/django/test/client.py:339: in get
    **extra,
../../.virtualenvs/django-centralauth-8xEOLZjf/lib/python3.6/site-packages/django/test/client.py:414: in generic
    return self.request(**r)
../../.virtualenvs/django-centralauth-8xEOLZjf/lib/python3.6/site-packages/django/test/client.py:495: in request
    raise exc_value
../../.virtualenvs/django-centralauth-8xEOLZjf/lib/python3.6/site-packages/django/core/handlers/exception.py:34: in inner
    response = get_response(request)
../../.virtualenvs/django-centralauth-8xEOLZjf/lib/python3.6/site-packages/django/core/handlers/base.py:126: in _get_response
    response = self.process_exception_by_middleware(e, request)
../../.virtualenvs/django-centralauth-8xEOLZjf/lib/python3.6/site-packages/django/core/handlers/base.py:124: in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
../../.virtualenvs/django-centralauth-8xEOLZjf/lib/python3.6/site-packages/django/views/generic/base.py:68: in view
    return self.dispatch(request, *args, **kwargs)
../../.virtualenvs/django-centralauth-8xEOLZjf/lib/python3.6/site-packages/django/views/generic/base.py:88: in dispatch
    return handler(request, *args, **kwargs)
centralauth/client/views.py:68: in get
    client_secret=settings.CENTRALAUTH_CLIENT_SECRET,
../../.virtualenvs/django-centralauth-8xEOLZjf/lib/python3.6/site-packages/requests_oauthlib/oauth2_session.py:307: in fetch_token
    self._client.parse_request_body_response(r.text, scope=self.scope)
../../.virtualenvs/django-centralauth-8xEOLZjf/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/clients/base.py:415: in parse_request_body_response
    self.token = parse_token_response(body, scope=scope)
../../.virtualenvs/django-centralauth-8xEOLZjf/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/parameters.py:425: in parse_token_response
    validate_token_parameters(params)
../../.virtualenvs/django-centralauth-8xEOLZjf/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/parameters.py:432: in validate_token_parameters
    raise_from_error(params.get('error'), params)
../../.virtualenvs/django-centralauth-8xEOLZjf/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/errors.py:405: in raise_from_error
    raise cls(**kwargs)
E   oauthlib.oauth2.rfc6749.errors.InvalidClientError: (invalid_client)```

Improve test coverage

We need to add more tests to ensure the have all critical parts covered by tests.

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.