server/src/metaeducation/auth.py
author durandn
Tue, 16 Feb 2016 15:43:00 +0100
changeset 1 5f50937893ac
child 6 39cecdd5260e
permissions -rw-r--r--
Commit work on metaeducation

from rest_framework.authentication import BaseAuthentication

class OAuth2ClientCredentialsAuthentication(BaseAuthentication):
    
    def authenticate(self, request):
        # get token, get username
        
        # send token to Oauth server
        
        # if token is authorized, login user
        return (user, None)