Download the PHP package coresite/apiauthbundle without Composer

On this page you can find all versions of the php package coresite/apiauthbundle. 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 apiauthbundle

APIAuthBundle

Авторизация по токену, для REST приложений.

Установка и подключение

Установка:

$ composer require coresite/apiauthbundle

Подключение:

// app/AppKernel.php
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new CoreSite\APIAuthBundle\CoreSiteAPIAuthBundle(),
            // ...
        );

        // ...
    }
}   

Настройка:

Пример настройки, вам скорее всего придется производить настройку под свою конфигурацию.

// app/security.yml
firewalls:

    # ...

    api:
        pattern: ^/api
        stateless: true
        simple_preauth:
            authenticator: cs_apiauth_authenticator
            provider: cs_apiauth_user_provider

    api_login:
        provider: fos_userbundle
        stateless: true
        anonymous: ~
        cs_apiauth_login:
            check_path:               api_login_check
            username_parameter:       _username
            password_parameter:       _password
            success_handler:          cs_apiauth_user_handler_authentication_success
            failure_handler:          cs_apiauth_user_handler_authentication_failure
            require_previous_session: false
        logout:
            success_handler:          cs_apiauth_user_handler_logout

    # ...

    providers:
        fos_userbundle:
            id: fos_user.user_provider.username
        cs_apiauth_user_provider:
            id: cs_apiauth_user_provider

        access_control:
            - { path: ^/api, role: IS_AUTHENTICATED_FULLY }
            - { path: ^/login_check, roles: IS_AUTHENTICATED_ANONYMOUSLY }     

    # ...                   

Создание таблицы для хранение токенов:


    # php bin/console doctrine:schema:update --force 

Отказ от отвестовенности

Обратите внимание, что данный бандел разработан для личных нужд и не является до конца доработанным проектом, его использование не рекомендуется промышленных целей. Автор не несет ни какой ответственности за проблемы которые могут возникнут при использования данного кода.


All versions of apiauthbundle with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
symfony/symfony Version >=3.0
friendsofsymfony/rest-bundle Version >=2.1-dev
friendsofsymfony/user-bundle Version >=2.0-dev
coresite/corebundle Version >=0.2.0-dev
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 coresite/apiauthbundle contains the following files

Loading the files please wait ....