<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.oauth.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'oauth.setauthtype.php',
    1 => 'OAuth::setAuthType',
    2 => 'Set authorization type',
  ),
  'up' => 
  array (
    0 => 'class.oauth.php',
    1 => 'OAuth',
  ),
  'prev' => 
  array (
    0 => 'oauth.getrequesttoken.php',
    1 => 'OAuth::getRequestToken',
  ),
  'next' => 
  array (
    0 => 'oauth.setcapath.php',
    1 => 'OAuth::setCAPath',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/oauth/oauth/setauthtype.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="oauth.setauthtype" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">OAuth::setAuthType</h1>
  <p class="verinfo">(PECL OAuth &gt;= 0.99.1)</p><p class="refpurpose"><span class="refname">OAuth::setAuthType</span> &mdash; <span class="dc-title">Set authorization type</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-oauth.setauthtype-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>OAuth::setAuthType</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$auth_type</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="simpara">
   Set where the OAuth parameters should be passed.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-oauth.setauthtype-parameters">
  <h3 class="title">Parameters</h3>
  <dl>
   
    <dt><code class="parameter">auth_type</code></dt>
     <dd>
      <p class="para">
       <code class="parameter">auth_type</code> can be one of the following flags (in order of decreasing preference as per OAuth 1.0 section 5.2):
       <dl>
        
         <dt><strong><code><a href="oauth.constants.php#constant.oauth-auth-type-authorization">OAUTH_AUTH_TYPE_AUTHORIZATION</a></code></strong></dt>
         <dd>
         <span class="simpara">
          Pass the OAuth parameters in the HTTP <code class="literal">Authorization</code> header.
         </span>
        </dd>
       
       
        <dt><strong><code><a href="oauth.constants.php#constant.oauth-auth-type-form">OAUTH_AUTH_TYPE_FORM</a></code></strong></dt>
        <dd>
         <span class="simpara">
          Append the OAuth parameters to the HTTP POST request body.
         </span>
        </dd>
       
       
        <dt><strong><code><a href="oauth.constants.php#constant.oauth-auth-type-uri">OAUTH_AUTH_TYPE_URI</a></code></strong></dt>
        <dd>
         <span class="simpara">
          Append the OAuth parameters to the request URI.
         </span>
        </dd>
       
       
        <dt><strong><code><a href="oauth.constants.php#constant.oauth-auth-type-none">OAUTH_AUTH_TYPE_NONE</a></code></strong></dt>
        <dd>
         <span class="simpara">
          None.
         </span>
        </dd>
       
      </dl>
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-oauth.setauthtype-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="simpara">
   Returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if a parameter is correctly set, otherwise <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>
   (e.g., if an invalid <code class="parameter">auth_type</code> is passed in.)
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-oauth.setauthtype-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>PECL oauth 1.0.0</td>
      <td>
       Previously returned <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> on failure, instead of <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


</div><?php manual_footer($setup); ?>