class ApiAccountRateLimitStatusAction extends ApiBareAuthAction
{
- /**
- * Take arguments for running
- *
- * @param array $args $_REQUEST args
- *
- * @return boolean success flag
- *
- */
-
- function prepare($args)
- {
- parent::prepare($args);
-
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return false;
- }
- }
-
- return true;
- }
/**
* Handle the request
class ApiAccountVerifyCredentialsAction extends ApiAuthAction
{
- /**
- * Take arguments for running
- *
- * @param array $args $_REQUEST args
- *
- * @return boolean success flag
- *
- */
-
- function prepare($args)
- {
- parent::prepare($args);
-
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return false;
- }
- }
-
- return true;
- }
/**
* Handle the request
{
parent::prepare($args);
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return;
- }
- }
-
$this->user = $this->auth_user;
$this->other = $this->getTargetUser($this->arg('id'));
{
parent::prepare($args);
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return;
- }
- }
-
$this->user = $this->auth_user;
$this->other = $this->getTargetUser($this->arg('id'));
{
parent::prepare($args);
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return;
- }
- }
-
$this->user = $this->auth_user;
if (empty($this->user)) {
{
parent::prepare($args);
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return;
- }
- }
-
$this->user = $this->auth_user;
if (empty($this->user)) {
{
parent::prepare($args);
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return;
- }
- }
-
$this->user = $this->auth_user;
$this->notice = Notice::staticGet($this->arg('id'));
{
parent::prepare($args);
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return;
- }
- }
-
$this->user = $this->auth_user;
$this->notice = Notice::staticGet($this->arg('id'));
{
parent::prepare($args);
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return;
- }
- }
-
$this->user = $this->auth_user;
$this->other = $this->getTargetUser($id);
{
parent::prepare($args);
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return;
- }
- }
-
$this->user = $this->auth_user;
$this->other = $this->getTargetUser($id);
{
parent::prepare($args);
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return;
- }
- }
-
$source_id = (int)$this->trimmed('source_id');
$source_screen_name = $this->trimmed('source_screen_name');
$target_id = (int)$this->trimmed('target_id');
{
parent::prepare($args);
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return;
- }
- }
-
$this->user = $this->getTargetUser(null);
$this->group = $this->getTargetGroup(null);
$this->format = $this->arg('format');
{
parent::prepare($args);
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return;
- }
- }
-
$this->user = $this->auth_user;
$this->group = $this->getTargetGroup($this->arg('id'));
{
parent::prepare($args);
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return;
- }
- }
-
$this->user = $this->auth_user;
$this->group = $this->getTargetGroup($this->arg('id'));
{
parent::prepare($args);
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return;
- }
- }
-
$this->page = (int)$this->arg('page', 1);
$this->count = (int)$this->arg('count', 20);
$this->max_id = (int)$this->arg('max_id', 0);
{
parent::prepare($args);
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return false;
- }
- }
-
$this->user = $this->auth_user;
$this->notice_id = (int)$this->trimmed('id');
{
parent::prepare($args);
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return false;
- }
- }
-
$this->user = $this->auth_user;
if (empty($this->user)) {
$this->count = isset($this->ids_only) ?
5000 : (int)$this->arg('count', 100);
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return false;
- }
- }
-
$this->user = $this->getTargetUser($this->arg('id'));
if (empty($this->user)) {
{
parent::prepare($args);
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return;
- }
- }
-
$this->page = (int)$this->arg('page', 1);
$this->count = (int)$this->arg('count', 20);
$this->max_id = (int)$this->arg('max_id', 0);
$this->since = $this->arg('since');
$this->format = $this->arg('format');
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return;
- }
- }
-
$this->user = $this->getTargetUser($this->arg('id'));
if (empty($this->user)) {
$this->since_id = (int)$this->arg('since_id', 0);
$this->since = $this->arg('since');
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return;
- }
- }
-
$this->user = $this->getTargetUser($this->arg('id'));
if (empty($this->user)) {
$this->since_id = (int)$this->arg('since_id', 0);
$this->since = $this->arg('since');
- if ($this->requiresAuth()) {
- if ($this->checkBasicAuthUser() == false) {
- return;
- }
- }
-
$this->user = $this->getTargetUser($this->arg('id'));
if (empty($this->user)) {
var $auth_user = null;
+ /**
+ * Take arguments for running, and output basic auth header if needed
+ *
+ * @param array $args $_REQUEST args
+ *
+ * @return boolean success flag
+ *
+ */
+
+ function prepare($args)
+ {
+ parent::prepare($args);
+
+ if ($this->requiresAuth()) {
+ $this->checkBasicAuthUser();
+ }
+
+ return true;
+ }
+
/**
* Does this API resource require authentication?
*
// show error if the user clicks 'cancel'
$this->showBasicAuthError();
- return false;
+ exit;
} else {
$nickname = $this->auth_user;
"$nickname, proxy = $proxy, ip = $ip."
);
$this->showBasicAuthError();
- return false;
+ exit;
}
}
return true;
class ApiBareAuthAction extends ApiAuthAction
{
+
+ /**
+ * Take arguments for running
+ *
+ * @param array $args $_REQUEST args
+ *
+ * @return boolean success flag
+ *
+ */
+
+ function prepare($args)
+ {
+ parent::prepare($args);
+ return true;
+ }
+
/**
* Does this API resource require authentication?
*