Sophie

Sophie

distrib > Mageia > 7 > armv7hl > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 10987

php-manual-en-7.2.11-1.mga7.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Set authorization type</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="oauth.getrequesttoken.html">OAuth::getRequestToken</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="oauth.setcapath.html">OAuth::setCAPath</a></div>
 <div class="up"><a href="class.oauth.html">OAuth</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><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="type">bool</span> <span class="methodname"><strong>OAuth::setAuthType</strong></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$auth_type</code></span>
   )</div>

  <p class="para rdfs-comment">
   Set where the OAuth parameters should be passed.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-oauth.setauthtype-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <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>OAUTH_AUTH_TYPE_AUTHORIZATION</code></strong></dt>

          <dd>

          <span class="simpara">
           Pass the OAuth parameters in the HTTP <em>Authorization</em> header.
          </span>
         </dd>

        
        
         <dt>
<strong><code>OAUTH_AUTH_TYPE_FORM</code></strong></dt>

         <dd>

          <span class="simpara">
           Append the OAuth parameters to the HTTP POST request body.
          </span>
         </dd>

        
        
         <dt>
<strong><code>OAUTH_AUTH_TYPE_URI</code></strong></dt>

         <dd>

          <span class="simpara">
           Append the OAuth parameters to the request URI.
          </span>
         </dd>

        
        
         <dt>
<strong><code>OAUTH_AUTH_TYPE_NONE</code></strong></dt>

         <dd>

          <span class="simpara">
           None.
          </span>
         </dd>

        
       </dl>

      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-oauth.setauthtype-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns <strong><code>TRUE</code></strong> if a parameter is correctly set, otherwise <strong><code>FALSE</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>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>1.0.0</td>
       <td>
        Previously returned <strong><code>NULL</code></strong> on failure, instead of <strong><code>FALSE</code></strong>.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="oauth.getrequesttoken.html">OAuth::getRequestToken</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="oauth.setcapath.html">OAuth::setCAPath</a></div>
 <div class="up"><a href="class.oauth.html">OAuth</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>