#NEWLINE# def generate_token( user , expiration = TWO_WEEKS ) : #NEWLINE# #INDENT# s = Serializer ( app . config [ 'SECRET_KEY' ] , expires_in = expiration ) #NEWLINE# return s . dumps ( { #NEWLINE# #INDENT# 'id' : user . id , #NEWLINE# 'email' : user . email , #NEWLINE# 'is_admin' : user . is_admin , #NEWLINE# #UNINDENT# } )