Я хочу использовать oauth2
для приложения
Для client side
Я использую следующий код:
$provider = new \League\OAuth2\Client\Provider\GenericProvider([
'clientId' => 'xxx',
'clientSecret' => 'xxx',
'redirectUri' => 'http://my-site.com/redirect-url/',
'urlAuthorize' => 'http://my-site.com/oauth2/lockdin/authorize',
'urlAccessToken' => 'http://my-site.com/oauth2/lockdin/token',
'urlResourceOwnerDetails' => 'http://my-site.com/oauth2/lockdin/resource'
]);
Для создания нового токена я должен отправить запрос на my-site.com
Но я не могу найти server side
php коды для oauth2
Где я могу найти oauth2/lockdin/authorize
или oauth2/lockdin/token
коды?
Я нахожу этот код:
// Setup the authorization server
$server = new AuthorizationServer(
new ClientRepository(), // instance of ClientRepositoryInterface
new AccessTokenRepository(), // instance of AccessTokenRepositoryInterface
new ScopeRepository(), // instance of ScopeRepositoryInterface
'file://'.__DIR__.'/../private.key', // path to private key
'file://'.__DIR__.'/../public.key' // path to public key
);
Но где я использую cliendtId
или clientSecert
?!