34 lines
968 B
PHP
34 lines
968 B
PHP
<?php
|
|
|
|
// how many OAIDs to create at once
|
|
// 0 requires command line argument (which always overrides this variable)
|
|
$batch_size = 0;
|
|
|
|
$oauth_url = "https://sso.yio.at/auth/realms/oaid/protocol/openid-connect/token";
|
|
|
|
$baseurl = "https://api.oaid.at/v2";
|
|
$client_id = "oaid.ofaa.esteiermark";
|
|
$client_secret = "4a5b09ed-956c-4721-bb53-3a144fc5f55a";
|
|
$tenant = "ofaa.esteiermark";
|
|
|
|
/*
|
|
$baseurl = "https://api-demo.oaid.at/v1";
|
|
$client_id = "oaid.demo.pip";
|
|
$client_secret = "6e74e7e8-0cc2-43df-83c2-12937452b916";
|
|
*/
|
|
$ep_mgm_credits = $baseurl."/pip/mgm/credits/";
|
|
$ep_list_oaids = $baseurl."/pip/codes/";
|
|
$ep_request_oaid = $baseurl."/pip/codes/";
|
|
$ep_confirm_oaid = $baseurl."/pip/codes/{oaid}/";
|
|
|
|
//$default_scope = ["oaid:mgm:read","oaid:codes:read","oaid:codes:write"];
|
|
$default_scope = ["read","write"]; // since v2
|
|
$access_token = "";
|
|
|
|
$token_file = __DIR__."/.access_token";
|
|
if(file_exists($token_file)) {
|
|
$access_token = file_get_contents($token_file);
|
|
}
|
|
|
|
|