code: def login(self, client_id, username, password, connection, id_token=None,
                grant_type='password', device=None, scope='openid'):
          
          warnings.warn("/oauth/ro will be deprecated in future releases", DeprecationWarning)
          return self.post(
              'https://{}/oauth/ro'.format(self.domain),
              data={
                  'client_id': client_id,
                  'username': username,
                  'password': password,
                  'id_token': id_token,
                  'connection': connection,
                  'device': device,
                  'grant_type': grant_type,
                  'scope': scope,
              },
              headers={'Content-Type': 'application/json'}
          )
docs: Login using username and password
  
          Given the user credentials and the connection specified, it will do
          the authentication on the provider and return a dict with the
          access_token and id_token. This endpoint only works for database
          connections, passwordless connections, Active Directory/LDAP,
          Windows Azure AD and ADFS.