def basic_auth!(username,password,key=nil)
      self.discover!
      @key ||= key if key
      @agent.basic_auth username, password
      response = @agent.get @discovery['links']['fs-identity-v2-login']['href'], :dataFormat => 'application/json', :key => @key
      @access_token = response.body['session']['id']
      @agent.authorization('Bearer',@access_token)
      return true
    end
def basic_auth!(username,password,key=nil)
      self.discover!
      @key ||= key if key
      @agent.basic_auth username, password
      response = @agent.get @discovery['links']['fs-identity-v2-login']['href'], :dataFormat => 'application/json', :key => @key
      @access_token = response.body['session']['id']
      @agent.authorization('Bearer',@access_token)
      return true
    end
Performs an authentication against the /identity/v2/login resource. It uses the
 {Discovery Resource}[https://familysearch.org/.well-known/app-meta.json] to determine the URL to make the request to
 in case the URL ever changes. This is only to be used for testing/development.

 *Note*: You may *NOT* use this method for building web applications. All web applications must use OAuth/OAuth2.
 Your web application will not be certified if it prompts for user credentials within the application. Also, you may not use
 your personal credentials to authenticate your system in behalf of a user.

 *Args*    :
 - +username+: A FamilySearch username.
 - +password+: The user's password.
 - +key+ (optional): Your developer key if it wasn't already set when you initialized the FamilySearch::Client
 *Returns* :
 - true
 *Raises*  :
 - +FamilySearch::Error::BadCredentials+: If it cannot authenticate