PHP Класс OAuthController

Наследование: extends CI_Controller
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$components
$helpers
$uses

Открытые методы

Метод Описание
authorize ( ) Example Authorize Endpoint
beforeFilter ( ) beforeFilter
blackHole ( string $type ) Blackhold callback
login ( ) Example Login Action
token ( ) Example Token Endpoint - this is where clients can retrieve an access token
userinfo ( ) Quick and dirty example implementation for protecetd resource

Приватные методы

Метод Описание
validateRequest ( ) Check for any Security blackhole errors

Описание методов

authorize() публичный Метод

Send users here first for authorization_code grant mechanism Required params (GET or POST): - response_type = code - client_id - redirect_url
public authorize ( )

beforeFilter() публичный Метод

beforeFilter
public beforeFilter ( )

blackHole() публичный Метод

OAuth requests will fail postValidation, so rather than disabling it completely if the request does fail this check we store it in $this->blackHoled and then when handling our forms we can use $this->validateRequest() to check if there were any errors and handle them with an exception. Requests that fail for reasons other than postValidation are handled here immediately using the best guess for if it was a form or OAuth
public blackHole ( string $type )
$type string

login() публичный Метод

Users must authorize themselves before granting the app authorization Allows login state to be maintained after authorization
public login ( )

token() публичный Метод

Grant types and parameters: 1) authorization_code - exchange code for token - code - client_id - client_secret 2) refresh_token - exchange refresh_token for token - refresh_token - client_id - client_secret 3) password - exchange raw details for token - username - password - client_id - client_secret
public token ( )

userinfo() публичный Метод

User accesible via $this->OAuth->user(); Single fields avaliable via $this->OAuth->user("id");
public userinfo ( )

Описание свойств

$components публичное свойство

public $components

$helpers публичное свойство

public $helpers

$uses публичное свойство

public $uses