Git Product home page Git Product logo

sfoauthplugin's Introduction

# sfOAuth plugin #

The `sfOAuthPlugin` is a symfony plugin that provides authentication and
authorization features over oauth for `sfDoctrineGuardPlugin`.

## Installation ##

This plugin requires oauth pecl extension for oauth 1.0. The propel version is not implemented yet.

  * Install the plugin (via a package)

        symfony plugin:install sfOAuthPlugin

  * Install the plugin (via a Subversion checkout)
  
        svn co http//svn.symfony-project.com/plugins/sfOAuthPlugin/branch/1.4 plugins/sfOAuthPlugin

  * Activate the plugin in the `config/ProjectConfiguration.class.php`
  
        [php]
        class ProjectConfiguration extends sfProjectConfiguration
        {
          public function setup()
          {
            $this->enablePlugins(array(
              'sfDoctrinePlugin', 
              'sfDoctrineGuardPlugin',
              'sfOAuthPlugin',
              '...'
            ));
          }
        }

  * Enable one or more modules in your `settings.yml` (optional)

        all:
          .settings:
            enabled_modules:      [default, sfAuth, sfOAuth]

  * Add oauth provider configuration in your `app.yml`

        all:
          sf_oauth_plugin:
            enabled: true
            provider:
              facebook:
                enabled:         true
                protocol:        2
                consumer_key:    xxxxxxxxxxxxxxx
                consumer_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                scope:           email
                authorize_url:   https://graph.facebook.com/oauth/authorize
                access_url:      https://graph.facebook.com/oauth/access_token
                profile_url:     https://graph.facebook.com/me
              google:
                enabled:         true
                protocol:        1
                consumer_key:    anonymous
                consumer_secret: anonymous
                scope:           https://www.googleapis.com/auth/userinfo#email
                request_url:     https://www.google.com/accounts/OAuthGetRequestToken
                authorize_url:   https://www.google.com/accounts/OAuthAuthorizeToken
                access_url:      https://www.google.com/accounts/OAuthGetAccessToken
                email_url:       https://www.googleapis.com/userinfo/email

  * Clear you cache

        symfony cc

sfoauthplugin's People

Contributors

gimler avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.