flask_oauthlib/contrib/oauth2.py
def set(self, client_id, code, request, *args, **kwargs):
        """Creates Grant object with the given params

        :param client_id: ID of the client
        :param code:
        :param request: OAuthlib request object
        """
        expires = datetime.utcnow() + timedelta(seconds=100)
        grant = self.model(
            client_id=request.client.client_id,
            code=code['code'],
            redirect_uri=request.redirect_uri,
            scope=' '.join(request.scopes),
            user=self.current_user(),
            expires=expires
        )
        self.session.add(grant)

        self.session.commit()
def set(self, client_id, code, request, *args, **kwargs):
        expires = datetime.utcnow() + timedelta(seconds=100)
        grant = self.model(
            client_id=request.client.client_id,
            code=code['code'],
            redirect_uri=request.redirect_uri,
            scope=' '.join(request.scopes),
            user=self.current_user(),
            expires=expires
        )
        self.session.add(grant)

        self.session.commit()
def set ( self , client_id , code , request , * args , * * kwargs ) : expires = datetime . utcnow ( ) + timedelta ( seconds = 100 ) grant = self . model ( client_id = request . client . client_id , code = code [ 'code' ] , redirect_uri = request . redirect_uri , scope = ' ' . join ( request . scopes ) , user = self . current_user ( ) , expires = expires ) self . session . add ( grant ) self . session . commit ( )
Creates Grant object with the given params

        :param client_id: ID of the client
        :param code:
        :param request: OAuthlib request object
Creates Grant object with the given params