PHP Classes

File: app/middleware/auth.php

Recommend this page to a friend!
  Classes of Ali YILMAZ  >  PHP API Service  >  app/middleware/auth.php  >  Download  
File: app/middleware/auth.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP API Service
Implements a project API using the Mind framework
Author: By
Last change:
Date: 6 months ago
Size: 492 bytes
 

Contents

Class file image Download
<?php

if($_SERVER['REQUEST_METHOD'] == 'POST'){
    if(!isset(
$this->post['partner_name']) OR !isset($this->post['partner_token'])){
       
$this->abort('501','Missing partner_name or partner_token');
    } else {
        if(!
$this->do_have('partners', ['partner_name'=>$this->post['partner_name'], 'partner_token'=>$this->post['partner_token']])){
           
$this->abort('501','Invalid partner_name or partner_token');
        }
    }
} else {
   
$this->abort('501','Access denied');
}

For more information send a message to info at phpclasses dot org.