'Add the resource owner password and username to the request body.
The client makes a request to the token endpoint by adding the
following parameters using the "application/x-www-form-urlencoded"
format per `Appendix B`_ in the HTTP request entity-body:
:param username:    The resource owner username.
:param password:    The resource owner password.
:param scope:   The scope of the access request as described by
`Section 3.3`_.
:param kwargs:  Extra credentials to include in the token request.
If the client type is confidential or the client was issued client
credentials (or assigned other authentication requirements), the
client MUST authenticate with the authorization server as described
in `Section 3.2.1`_.
The prepared body will include all provided credentials as well as
the ``grant_type`` parameter set to ``password``::
>>> from oauthlib.oauth2 import LegacyApplicationClient
>>> client = LegacyApplicationClient(\'your_id\')
>>> client.prepare_request_body(username=\'foo\', password=\'bar\', scope=[\'hello\', \'world\'])
\'grant_type=password&username=foo&scope=hello+world&password=bar\'
.. _`Appendix B`: http://tools.ietf.org/html/rfc6749#appendix-B
.. _`Section 3.3`: http://tools.ietf.org/html/rfc6749#section-3.3
.. _`Section 3.2.1`: http://tools.ietf.org/html/rfc6749#section-3.2.1'

def prepare_request_body(self, username, password, body=u'', scope=None, **kwargs):

    return prepare_token_request(u'password', body=body, username=username, password=password, scope=scope, **kwargs)
