synapse/handlers/auth.py
def _check_auth_dict(self, authdict, clientip):
        """Attempt to validate the auth dict provided by a client

        Args:
            authdict (object): auth dict provided by the client
            clientip (str): IP address of the client

        Returns:
            Deferred: result of the stage verification.

        Raises:
            StoreError if there was a problem accessing the database
            SynapseError if there was a problem with the request
            LoginError if there was an authentication problem.
        """
        login_type = authdict['type']
        checker = self.checkers.get(login_type)
        if checker is not None:
            res = yield checker(authdict, clientip)
            defer.returnValue(res)

        # build a v1-login-style dict out of the authdict and fall back to the
        # v1 code
        user_id = authdict.get("user")

        if user_id is None:
            raise SynapseError(400, "", Codes.MISSING_PARAM)

        (canonical_id, callback) = yield self.validate_login(user_id, authdict)
        defer.returnValue(canonical_id)
Attempt to validate the auth dict provided by a client

        Args:
            authdict (object): auth dict provided by the client
            clientip (str): IP address of the client

        Returns:
            Deferred: result of the stage verification.

        Raises:
            StoreError if there was a problem accessing the database
            SynapseError if there was a problem with the request
            LoginError if there was an authentication problem.
        
Attempt to validate the auth dict provided by a client
Args:
authdict (object): auth dict provided by the client
clientip (str): IP address of the client

result of the stage verification.

StoreError if there was a problem accessing the database
SynapseError if there was a problem with the request
LoginError if there was an authentication problem.
Attempt to validate the auth dict provided by a client Args : authdict ( object ) : auth dict provided by the client clientip ( str ) : IP address of the client result of the stage verification . StoreError if there was a problem accessing the database SynapseError if there was a problem with the request LoginError if there was an authentication problem .
def _check_auth_dict(self, authdict, clientip):
        login_type = authdict['type']
        checker = self.checkers.get(login_type)
        if checker is not None:
            res = yield checker(authdict, clientip)
            defer.returnValue(res)
        user_id = authdict.get("user")
        if user_id is None:
            raise SynapseError(400, "", Codes.MISSING_PARAM)
        (canonical_id, callback) = yield self.validate_login(user_id, authdict)
        defer.returnValue(canonical_id)
def _check_auth_dict ( self , authdict , clientip ) : login_type = authdict [ 'type' ] checker = self . checkers . get ( login_type ) if checker is not None : res = yield checker ( authdict , clientip ) defer . returnValue ( res ) user_id = authdict . get ( "user" ) if user_id is None : raise SynapseError ( 400 , "" , Codes . MISSING_PARAM ) ( canonical_id , callback ) = yield self . validate_login ( user_id , authdict ) defer . returnValue ( canonical_id )
Attempt to validate the auth dict provided by a client
Args:
authdict (object): auth dict provided by the client
clientip (str): IP address of the client
Attempt to validate the auth dict provided by a client Args : authdict ( object ) : auth dict provided by the client clientip ( str ) : IP address of the client
"""Attempt to validate the auth dict provided by a client

        Args:
            authdict (object): auth dict provided by the client
            clientip (str): IP address of the client

        Returns:
            Deferred: result of the stage verification.

        Raises:
            StoreError if there was a problem accessing the database
            SynapseError if there was a problem with the request
            LoginError if there was an authentication problem.
        """ # build a v1-login-style dict out of the authdict and fall back to the # v1 code
self
authdict
clientip