ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
OAuthSignatureMethod_PLAINTEXT Class Reference

The PLAINTEXT method does not provide any security protection and SHOULD only be used over a secure channel such as HTTPS. More...

+ Inheritance diagram for OAuthSignatureMethod_PLAINTEXT:
+ Collaboration diagram for OAuthSignatureMethod_PLAINTEXT:

Public Member Functions

 get_name ()
 Needs to return the name of the Signature Method (ie HMAC-SHA1) More...
 
 build_signature ($request, $consumer, $token)
 oauth_signature is set to the concatenated encoded values of the Consumer Secret and Token Secret, separated by a '&' character (ASCII code 38), even if either secret is empty. More...
 
- Public Member Functions inherited from OAuthSignatureMethod
 get_name ()
 Needs to return the name of the Signature Method (ie HMAC-SHA1) More...
 
 build_signature ($request, $consumer, $token)
 Build up the signature NOTE: The output of this function MUST NOT be urlencoded. More...
 
 check_signature ($request, $consumer, $token, $signature)
 Verifies that a given signature is correct. More...
 

Detailed Description

The PLAINTEXT method does not provide any security protection and SHOULD only be used over a secure channel such as HTTPS.

It does not use the Signature Base String.

  • Chapter 9.4 ("PLAINTEXT")

Definition at line 154 of file OAuth.php.

Member Function Documentation

◆ build_signature()

OAuthSignatureMethod_PLAINTEXT::build_signature (   $request,
  $consumer,
  $token 
)

oauth_signature is set to the concatenated encoded values of the Consumer Secret and Token Secret, separated by a '&' character (ASCII code 38), even if either secret is empty.

The result MUST be encoded again.

  • Chapter 9.4.1 ("Generating Signatures")

Please note that the second encoding MUST NOT happen in the SignatureMethod, as OAuthRequest handles this!

Reimplemented from OAuthSignatureMethod.

Definition at line 168 of file OAuth.php.

168 {
169 $key_parts = array(
170 $consumer->secret,
171 ($token) ? $token->secret : ""
172 );
173
174 $key_parts = OAuthUtil::urlencode_rfc3986($key_parts);
175 $key = implode('&', $key_parts);
176 $request->base_string = $key;
177
178 return $key;
179 }
static urlencode_rfc3986($input)
Definition: OAuth.php:763
$key
Definition: croninfo.php:18
$consumer
Definition: demo.php:30

References $consumer, $key, and OAuthUtil\urlencode_rfc3986().

+ Here is the call graph for this function:

◆ get_name()

OAuthSignatureMethod_PLAINTEXT::get_name ( )

Needs to return the name of the Signature Method (ie HMAC-SHA1)

Returns
string

Reimplemented from OAuthSignatureMethod.

Definition at line 155 of file OAuth.php.

155 {
156 return "PLAINTEXT";
157 }

The documentation for this class was generated from the following file: