aboutsummaryrefslogtreecommitdiffstats
path: root/include/oauth2.php
blob: f7a27989202c81faa4c4de0d8b50cef85aa4b08e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

/*
	$storage = new OAuth2\Storage\Pdo(\DBA::$dba->db);
	$config = [
		'use_openid_connect' => true,
		'issuer' => \Zotlabs\Lib\System::get_site_name()
	];

	$oauth2_server = new OAuth2\Server($storage,$config);

	$oauth2_server->addGrantType(new OAuth2\GrantType\ClientCredentials($storage));
	$oauth2_server->addGrantType(new OAuth2\GrantType\AuthorizationCode($storage));

	$keyStorage = new OAuth2\Storage\Memory( [
		'keys' => [
			'public_key' => Config::Get('system','pubkey'),
			'private_key' => Config::Get('system','prvkey')
		]
	]);

	$oauth2_server->addStorage($keyStorage,'public_key');
*/