#NEWLINE# def get_auth_token( self ) : #NEWLINE# #INDENT# "\n        Return the user's auth token. Use their password as part of the token\n        because if the user changes their password we will want to invalidate\n        all of their logins across devices. It is completely fine to use\n        md5 here as nothing leaks.\n\n        This satisfies Flask-Login by providing a means to create a token.\n\n        :return: str\n        " #NEWLINE# private_key = current_app . config [ 'SECRET_KEY' ] #NEWLINE# serializer = URLSafeTimedSerializer ( private_key ) #NEWLINE# data = [ str ( self . id ) , md5 ( self . password ) . hexdigest ( ) ] #NEWLINE# return serializer . dumps ( data ) . decode ( 'utf-8' )