Download the PHP package denits/yii-apiauth without Composer

On this page you can find all versions of the php package denits/yii-apiauth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii-apiauth

Yii ApiAuth Extension

ApiAuth : The first A in AAA

Authenticate a (REST) client through Http Authentication Methods like Http Digest or Http Basic (or implement your own authentication scheme)

Most webservers, like Apache or IIS support different types of HTTP authentication, but they can be difficult (if not impossible) to integrate with a custom user account source, especially one that is implemented in Yii. This extension uses only Yii, PHP and MySQL and should be easy to integrate in an existing Yii based Authorization scenario.

Even though this extension can be used for virtually any authentication scenario, it is mostly suitable for automation, for example in REST requests. Hence it's name apiAuth.

Yii comes with an extensive built in authorization scheme and many great extensions like Rights, Auth or yii-user that you can use alongside this extension. @see http://www.yiiframework.com/doc/guide/1.1/en/topics.auth

Home

https://github.com/DenitS/yii-apiAuth/

Git Clone

git clone [email protected]:DenitS/yii-apiAuth.git

Requirements

Installation

  1. Add apiAuth to the extensions folder:

    1. Manual:

      1. Create a folder 'apiAuth' in the extensions folder (application.extensions)
      2. Copy the contents of the yii-apiAuth extension to it.
    2. Git Submodule (from command line in [webroot]/protected/extensions/):
      1. $ git submodule add [email protected]:DenitS/yii-apiAuth.git apiAuth
  2. Create the nonce table by running (command line in protected folder):

    $ ./yiic migrate up --migrationPath=ext.apiAuth.migrations

Configuration

main.php

Securing Controllers

Secure controllers and actions by extending your controller with AController (Note the A).

Example:

Make sure you don't do it the other way around, for example:

Add the AAuthFilter to your controller's filter() method.

Full Example:

HTTP Digest: cleaning up Nonces

Over time the nonce table will grow in size. You will have to clean it periodically, but you will have to do this manually. I didn't want to call a DELETE FROM statement on every request, so i've created a static method in the ANonce model class that you can call whenever and wherever you like (See below).

For example it can be called from a yii command script, which you can in turn call via a cron job or the windows task scheduler.

Contribute

Contributions, remarks, improvements, etc. are always welcome.


All versions of yii-apiauth with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package denits/yii-apiauth contains the following files

Loading the files please wait ....