def login(self, client_id, client_secret, username, password, scope, realm,
              audience, grant_type='http://auth0.com/oauth/grant-type/password-realm'):
        """Calls oauth/token endpoint with password-realm grant type


        This is the OAuth 2.0 grant that highly trusted apps utilize in order
        to access an API. In this flow the end-user is asked to fill in credentials
        (username/password) typically using an interactive form in the user-agent
        (browser). This information is later on sent to the client and Auth0.
        It is therefore imperative that the client is absolutely trusted with
        this information.

        Args:
            grant_type (str): Denotes the flow you're using. For password realm
            use http://auth0.com/oauth/grant-type/password-realm

            client_id (str): your application's client Id

            client_secret (str): your application's client Secret

            audience (str): The unique identifier of the target API you want to access.

            username (str): Resource owner's identifier

            password (str): resource owner's Secret

            scope(str): String value of the different scopes the client is asking for.
            Multiple scopes are separated with whitespace.

            realm (str): String value of the realm the user belongs.
            Set this if you want to add realm support at this grant.

        Returns:
            access_token, id_token
        """

        return self.post(
            'https://{}/oauth/token'.format(self.domain),
            data={
                'client_id': client_id,
                'username': username,
                'password': password,
                'realm': realm,
                'client_secret': client_secret,
                'scope': scope,
                'audience': audience,
                'grant_type': grant_type
            },
            headers={'Content-Type': 'application/json'}
        )
Calls oauth/token endpoint with password-realm grant type


        This is the OAuth 2.0 grant that highly trusted apps utilize in order
        to access an API. In this flow the end-user is asked to fill in credentials
        (username/password) typically using an interactive form in the user-agent
        (browser). This information is later on sent to the client and Auth0.
        It is therefore imperative that the client is absolutely trusted with
        this information.

        Args:
            grant_type (str): Denotes the flow you're using. For password realm
            use http://auth0.com/oauth/grant-type/password-realm

            client_id (str): your application's client Id

            client_secret (str): your application's client Secret

            audience (str): The unique identifier of the target API you want to access.

            username (str): Resource owner's identifier

            password (str): resource owner's Secret

            scope(str): String value of the different scopes the client is asking for.
            Multiple scopes are separated with whitespace.

            realm (str): String value of the realm the user belongs.
            Set this if you want to add realm support at this grant.

        Returns:
            access_token, id_token