I use Restler as the OAuth Server, and implement iAuthenticate.__isAllowed in OAuthServer
public function __isAllowed() {
return self::$server->verifyResourceRequest(static::$request, null, $scope );
}
when i have multiple apis like
$r = new Restler();
$r->addAuthenticationClass('OAuthServer', 'oauth')
$r->addAPIClass('EMail', 'email');
$r->addAPIClass('Member', 'member');
Here is the question, I have different scope in each api, How do I know the exact api is called in __isAllowed??
I know is a solution to use "url" as scope, but what if I still wana know how to use "email" or "member" as scope ??
thanks
Since Authentication Class is also an api class it gets the rester instance as restler property
Restler has apiMethodInfo which is an instance of ApiMethodInfo so you can do the following to get the data