spomky-labs/oauth2-server-scope-manager-bundle

This package is abandoned and no longer maintained. The author suggests using the spomky-labs/oauth2-server-bundle package instead.

Symfony2 OAuth2 Server Scope Manager Bundle

v5.0.1 2015-06-15 20:27 UTC

This package is not auto-updated.

Last update: 2015-08-17 10:43:29 UTC


README

Scrutinizer Code Quality Build Status HHVM Status PHP 7 ready

SensioLabsInsight

Latest Stable Version Total Downloads Latest Unstable Version License

This bundle provides a simple scope manager for your OAuth2 Server.

It relies on the OAuth2 Interfaces Project.

The Release Process

The release process is described here .

Prerequisites

This bundle needs at least PHP 5.4 and Symfony v2.3.

It has been successfully tested using:

  • PHP: PHP 5.4 to PHP 5.6, PHP 7 and HHVM.
  • Symfony: v2.3.x to v2.7.x.

Installation

The preferred way to install this library is to rely on Composer:

composer require "spomky-labs/oauth2-server-scope-manager-bundle" "~5.0.0"

Enable the bundle

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        ...
        new SpomkyLabs\OAuth2ServerScopeManagerBundle\SpomkyLabsOAuth2ServerScopeManagerBundle(),
    );
}

Configuration

sl_oauth2_scope_manager:
    policy: default # Available policies:
                    # - 'default': uses default_scope if no scope is requested,
                    # - 'error': throws an error if no scope is requested,
                    # - null (default): no scope policy
    default_scope: scope1 scope2 # These scopes will be set if the policy is 'default' and no scope is requested (default: null)
    available_scope: scope1 scope2 scope3 scope4 # Scopes supported by the server (default: null)

How to use

You just have to inject the manager provided by this bundle: sl_oauth2_scope_manager.manager.

Contributing

Requests for new features, bug fixed and all other ideas to make this bundle useful are welcome. Please follow these best practices.

Licence

This bundle is release under MIT licence.