Extension:OAuth2Dataporten

Configuration parameters
$wgOAuth2Dataporten['client']['id'] 			= getenv('DATAPORTEN_CLIENTID') ? getenv('DATAPORTEN_CLIENTID') : '';

$wgOAuth2Dataporten['client']['secret'] 		= getenv('DATAPORTEN_CLIENTSECRET') ? getenv('DATAPORTEN_CLIENTSECRET') : ''; Client secret

$wgOAuth2Dataporten['config']['groups_array'] 	= getenv('DATAPORTEN_RIGHTS_ARRAY') ? json_decode(getenv('DATAPORTEN_RIGHTS_ARRAY'),true) : array; Dataporten groups with their respective roles on mediawiki

$wgOAuth2Dataporten['config']['auth_endpoint'] = 'https://auth.dataporten.no/oauth/authorization';            urls of authorization, token and info

$wgOAuth2Dataporten['config']['token_endpoint'] = 'https://auth.dataporten.no/oauth/token';

$wgOAuth2Dataporten['config']['info_endpoint'] = 'https://auth.dataporten.no/userinfo';

$wgOAuth2Dataporten['config']['auth_type']     = 'Bearer';

$wgOAuth2Dataporten['config']['group_endpoint'] = 'https://groups-api.dataporten.no/groups/me/groups';

$wgGroupPermissions['group']['right'] 			= true /* or false */;

$wgGroupPermissions['oauth2'] 					= $wgGroupPermissions['user'];