PHP 클래스 ZF\OAuth2\Controller\AuthController

상속: extends Zend\Mvc\Controller\AbstractActionController
파일 보기 프로젝트 열기: zfcampus/zf-oauth2 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$apiProblemErrorResponse boolean
$server OAuth2\Server
$serverFactory Factory for generating an OAuth2Server instance.
$userIdProvider ZF\OAuth2\Provider\UserId\UserIdProviderInterface

공개 메소드들

메소드 설명
__construct ( callable $serverFactory, ZF\OAuth2\Provider\UserId\UserIdProviderInterface $userIdProvider ) Constructor
authorizeAction ( ) Authorize action (/oauth/authorize)
isApiProblemErrorResponse ( ) : boolean Should the controller return ApiProblemResponse?
receiveCodeAction ( ) Receive code action prints the code/token access
resourceAction ( ) Test resource (/oauth/resource)
revokeAction ( ) Token Revoke (/oauth/revoke)
setApiProblemErrorResponse ( boolean $apiProblemErrorResponse ) Indicate whether ApiProblemResponse or oauth2 errors should be returned.
tokenAction ( ) Token Action (/oauth)

보호된 메소드들

메소드 설명
getApiProblemResponse ( OAuth2\Response $response ) : ZF\ApiProblem\ApiProblemResponse Map OAuth2Response to ApiProblemResponse
getErrorResponse ( OAuth2\Response $response ) : ZF\ApiProblem\ApiProblemResponse | Zend\Stdlib\ResponseInterface
getOAuth2Request ( ) : OAuth2\Request Create an OAuth2 request based on the ZF2 request object

비공개 메소드들

메소드 설명
getOAuth2Server ( string $type ) : OAuth2\Server Retrieve the OAuth2\Server instance.
setHttpResponse ( OAuth2\Response $response ) : Zend\Http\Response Convert the OAuth2 response to a \Zend\Http\Response

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( callable $serverFactory, ZF\OAuth2\Provider\UserId\UserIdProviderInterface $userIdProvider )
$serverFactory callable
$userIdProvider ZF\OAuth2\Provider\UserId\UserIdProviderInterface

authorizeAction() 공개 메소드

Authorize action (/oauth/authorize)
public authorizeAction ( )

getApiProblemResponse() 보호된 메소드

Map OAuth2Response to ApiProblemResponse
protected getApiProblemResponse ( OAuth2\Response $response ) : ZF\ApiProblem\ApiProblemResponse
$response OAuth2\Response
리턴 ZF\ApiProblem\ApiProblemResponse

getErrorResponse() 보호된 메소드

protected getErrorResponse ( OAuth2\Response $response ) : ZF\ApiProblem\ApiProblemResponse | Zend\Stdlib\ResponseInterface
$response OAuth2\Response
리턴 ZF\ApiProblem\ApiProblemResponse | Zend\Stdlib\ResponseInterface

getOAuth2Request() 보호된 메소드

Marshals: - query string - body parameters, via content negotiation - "server", specifically the request method and content type - raw content - headers This ensures that JSON requests providing credentials for OAuth2 verification/validation can be processed.
protected getOAuth2Request ( ) : OAuth2\Request
리턴 OAuth2\Request

isApiProblemErrorResponse() 공개 메소드

Should the controller return ApiProblemResponse?

receiveCodeAction() 공개 메소드

Receive code action prints the code/token access
public receiveCodeAction ( )

resourceAction() 공개 메소드

Test resource (/oauth/resource)
public resourceAction ( )

revokeAction() 공개 메소드

Token Revoke (/oauth/revoke)
public revokeAction ( )

setApiProblemErrorResponse() 공개 메소드

Boolean true indicates ApiProblemResponse should be returned (the default), while false indicates oauth2 errors (per the oauth2 spec) should be returned.
public setApiProblemErrorResponse ( boolean $apiProblemErrorResponse )
$apiProblemErrorResponse boolean

tokenAction() 공개 메소드

Token Action (/oauth)
public tokenAction ( )

프로퍼티 상세

$apiProblemErrorResponse 보호되어 있는 프로퍼티

protected bool $apiProblemErrorResponse
리턴 boolean

$server 보호되어 있는 프로퍼티

protected Server,OAuth2 $server
리턴 OAuth2\Server

$serverFactory 보호되어 있는 프로퍼티

Factory for generating an OAuth2Server instance.
protected $serverFactory

$userIdProvider 보호되어 있는 프로퍼티

protected UserIdProviderInterface,ZF\OAuth2\Provider\UserId $userIdProvider
리턴 ZF\OAuth2\Provider\UserId\UserIdProviderInterface