def generate_psk(self, identity):
        """
        Generates the PRE_SHARED_KEY from the gateway.

        Returns a Command.
        """
        def process_result(result):
            return result[ATTR_PSK]

        return Command('post', [ROOT_GATEWAY, ATTR_AUTH], {
            ATTR_IDENTITY: identity
        }, process_result=process_result)
def generate_psk ( self , identity ) : def process_result ( result ) : return result [ ATTR_PSK ] return Command ( 'post' , [ ROOT_GATEWAY , ATTR_AUTH ] , { ATTR_IDENTITY : identity } , process_result = process_result )
Generates the PRE_SHARED_KEY from the gateway.

        Returns a Command.