2017 © Pedro Peláez
 

yii2-extension yii2-satellizer-server

Yii2 Satellizer server

image

wfcreations/yii2-satellizer-server

Yii2 Satellizer server

  • Friday, August 21, 2015
  • by wfcreations
  • Repository
  • 2 Watchers
  • 1 Stars
  • 398 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 4 % Grown

The README.md

Yii2 Satellizer Server

Satellizer is a simple to use, end-to-end, token-based authentication module for AngularJS with built-in support for Google, Facebook, LinkedIn, Twitter, Yahoo, Windows Live authentication providers, as well as Email and Password sign-in. You are not limited to the sign-in options above, in fact you can add any OAuth 1.0 or OAuth 2.0 provider by passing provider-specific information during the configuration step., (*1)

Latest Stable Version Total Downloads Latest Unstable Version License, (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

composer require "wfcreations/yii2-satellizer-server:*"

or add, (*5)

"wfcreations/yii2-satellizer-server": "*",

to the require section of your composer.json file., (*6)

Usage

To use this extension, simply add the following code in your application configuration:, (*7)


'components' => [ 'satellizer' => [ 'class' => \wfcreations\satellizer\Satellizer::className(), 'identityClass' => \common\models\ar\Advertiser::className(), 'tokenLifetime' => 2 * 7 * 24 * 60 * 60, 'jwtKey' => 'jwtsecret', 'facebook' => [ 'clientSecret' => 'facebookscecret', ], ], // ... ]

In your auth controller, (*8)


use yii\rest\Controller; class AuthController extends Controller { public function actions() { return [ 'facebook' => [ 'class' => 'wfcreations\satellizer\actions\FacebookAction', ], ]; } protected function verbs() { return [ 'facebook' => ['post', 'options'], ]; } // ... }

In others controllers that require authenticated user, just configure authenticator in behaviors:, (*9)


'authenticator' => [ 'class' => HttpBearerAuth::className(), ],

If you want get authenticated user:, (*10)


Yii::$app->user->identity

Provider supported

  • [X] Facebook
  • [ ] Foursquare
  • [ ] Github
  • [ ] Google
  • [ ] LinkedIn
  • [ ] Via email and password
  • [ ] Twitter

For more information about yii2 api see Guide rest - Quick-start and yii2-app-api., (*11)

The Versions

21/08 2015

dev-master

9999999-dev

Yii2 Satellizer server

  Sources   Download

BSD

The Requires

 

by Welsiton Ferreira

authentication social yii2 server satellizer