Git Product home page Git Product logo

aegis's Introduction

Hi there, I am Mehmet👋

I am Co-founder & Game Designer at Gnarly Game Studio.

  • 🔭 I’m currently working on building casual games.
  • 🌱 I’m currently learning game design and the psychological basis of gaming.
  • 🤔 I would be happy to talk about company culture and game design ideas.
  • 💬 Ask me about data analysis, DevOps, LiveOps, back-end, casual game development.
  • 📫 How to reach me: https://www.linkedin.com/in/mgurdal/

aegis's People

Contributors

mgurdal avatar pyup-bot avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

aegis's Issues

Pull Request Template

The project needs a pull request template to help potential contributors to write the details of their PRs in a more standardized and convenient way.

Authenticator allows requests to pass if None is assigned as user

Describe the bug
BasicAuth allows requests to pass if the get_user method returns None as the user.

To Reproduce
Steps to reproduce the behavior:

  1. Create a BasicAuth authenticator
  2. Implement a get_user method that returns None
  3. See request enters to the view

Expected behavior
The server should return 401 UNAUTHORIZED response.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Windows
  • 10.0 Home

Mkdocs social icon update

Describe the bug
Building the documentation page causes an error due to a change in mkdocs social configuration

To Reproduce
Steps to reproduce the behavior:

  1. Run mkdocs build

Expected behavior
Builds the documentation under the site directory

Screenshots
mkdocs_error

Environment (please complete the following information):

  • OS: Windows
  • 10.0 Home

"pip wheel aegis" failing to build wheel

Description
Wheel of this package could not be built on the clear virtualenv without aiohttp and jwt installed

To Reproduce
Steps to reproduce the behavior:

  1. On *nix machine:
  2. Make new virtualenv
  3. Activate it
  4. mkdir /wheels && cd /wheels
  5. pip wheel aegis=1.0.0 -d .
  6. See error about aiohttp:
Collecting aegis==1.0.0
   Downloading https://files.pythonhosted.org/packages/90/67/e1af6100994a98f6e3729288b34bf8c65d8c837d7c50139cd76587b4c132/aegis-1.0.0.tar.gz
     ERROR: Command errored out with exit status 1:
      command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ctnwhnrv/aegis/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ctnwhnrv/aegis/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-ctnwhnrv/aegis/pip-egg-info
          cwd: /tmp/pip-install-ctnwhnrv/aegis/
     Complete output (9 lines):
     Traceback (most recent call last):
       File "<string>", line 1, in <module>
       File "/tmp/pip-install-ctnwhnrv/aegis/setup.py", line 12, in <module>
         from aegis import __version__
       File "/tmp/pip-install-ctnwhnrv/aegis/aegis/__init__.py", line 18, in <module>
         from .authenticators.base import BaseAuthenticator
       File "/tmp/pip-install-ctnwhnrv/aegis/aegis/authenticators/base.py", line 5, in <module>
         from aiohttp import web
     ModuleNotFoundError: No module named 'aiohttp'
  1. Run pip install aiohttp
  2. Repeat pip wheel aegis==1.0.0 -d .
  3. See error about jwt:
Collecting aegis==1.0.0
   Downloading https://files.pythonhosted.org/packages/90/67/e1af6100994a98f6e3729288b34bf8c65d8c837d7c50139cd76587b4c132/aegis-1.0.0.tar.gz
     ERROR: Command errored out with exit status 1:
      command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-bc581qq9/aegis/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-bc581qq9/aegis/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-wheel-bc581qq9/aegis/pip-egg-info
          cwd: /tmp/pip-wheel-bc581qq9/aegis/
     Complete output (9 lines):
     Traceback (most recent call last):
       File "<string>", line 1, in <module>
       File "/tmp/pip-wheel-bc581qq9/aegis/setup.py", line 12, in <module>
         from aegis import __version__
       File "/tmp/pip-wheel-bc581qq9/aegis/aegis/__init__.py", line 19, in <module>
         from .authenticators.jwt import JWTAuth
       File "/tmp/pip-wheel-bc581qq9/aegis/aegis/authenticators/jwt.py", line 5, in <module>
         import jwt
     ModuleNotFoundError: No module named 'jwt'

Expected behavior
pip wheel aegis==1.0.0 should build and store wheel in the /wheels directory.

Environment

  • OS: Any *nix machine (mine was Docker python:3.8-alpine)
  • Assuming that this *nix machine has all the needed build tools and python 3.6 or higher so installing aegis with deps pre-installed would be successful

Refresh token support for JWTAuth authenticator

We need a refresh token feature that users can activate with minimum effort.

Implementation

If the refresh_tokenvalue is set to True, user must be forced to override the existing refresh token generator and token validation methods.

class MyAuth(JWTAuth):
    jwt_secret = "<secret_key>"
    refresh_token = True
    
    async def validate_refresh_token(self, request: web.Request) -> bool:
        ...
    async def get_refresh_token(self, request: web.Request) -> str:
        ...

Authenticating

After enabling the refresh token, user should get the refresh token in the auth/response.

{
    "access_token": "<access_token>",
    "refresh_token": "<refresh_token>",
}

Refreshing

User should be able to retrieve a new access_token by using the existing credentials in the auth/refresh end-point.

{
    "access_token": "<access_token>",
}

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.