<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="oauth.setauthtype" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>OAuth::setAuthType</refname>
  <refpurpose>Set authorization type</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <modifier>public</modifier> <type>bool</type><methodname>OAuth::setAuthType</methodname>
   <methodparam><type>int</type><parameter>auth_type</parameter></methodparam>
  </methodsynopsis>
  <para>
   Set where the OAuth parameters should be passed.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>auth_type</parameter></term>
      <listitem>
       <para>
        <parameter>auth_type</parameter> can be one of the following flags (in order of decreasing preference as per OAuth 1.0 section 5.2):
        <variablelist>
         <varlistentry>
          <term><constant>OAUTH_AUTH_TYPE_AUTHORIZATION</constant></term>
          <listitem>
          <simpara>
           Pass the OAuth parameters in the HTTP <literal>Authorization</literal> header.
          </simpara>
         </listitem>
        </varlistentry>
        <varlistentry>
         <term><constant>OAUTH_AUTH_TYPE_FORM</constant></term>
         <listitem>
          <simpara>
           Append the OAuth parameters to the HTTP POST request body.
          </simpara>
         </listitem>
        </varlistentry>
        <varlistentry>
         <term><constant>OAUTH_AUTH_TYPE_URI</constant></term>
         <listitem>
          <simpara>
           Append the OAuth parameters to the request URI.
          </simpara>
         </listitem>
        </varlistentry>
        <varlistentry>
         <term><constant>OAUTH_AUTH_TYPE_NONE</constant></term>
         <listitem>
          <simpara>
           None.
          </simpara>
         </listitem>
        </varlistentry>
       </variablelist>
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns &true; if a parameter is correctly set, otherwise &false;
   (e.g., if an invalid <parameter>auth_type</parameter> is passed in.)
  </para>
 </refsect1>

 <refsect1 role="changelog">
  &reftitle.changelog;
  <para>
   <informaltable>
    <tgroup cols="2">
     <thead>
      <row>
       <entry>&Version;</entry>
       <entry>&Description;</entry>
      </row>
     </thead>
     <tbody>
      <row>
       <entry>PECL oauth 1.0.0</entry>
       <entry>
        &oauth.changelog.error.null;
       </entry>
      </row>
     </tbody>
    </tgroup>
   </informaltable>
  </para>
 </refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
