MDL-42666 oauthlib: Getter methods for accesstoken, client id and secret

This commit is contained in:
Frederic Massart 2013-11-04 15:55:33 +08:00
parent b2f9028559
commit 79d89136f0

View File

@ -617,6 +617,39 @@ abstract class oauth2_client extends curl {
return null;
}
/**
* Get access token.
*
* This is just a getter to read the private property.
*
* @return string
*/
public function get_accesstoken() {
return $this->accesstoken;
}
/**
* Get the client ID.
*
* This is just a getter to read the private property.
*
* @return string
*/
public function get_clientid() {
return $this->clientid;
}
/**
* Get the client secret.
*
* This is just a getter to read the private property.
*
* @return string
*/
public function get_clientsecret() {
return $this->clientsecret;
}
/**
* Should HTTP GET be used instead of POST?
* Some APIs do not support POST and want oauth to use