2023-05-15 15:21:13 +02:00
|
|
|
import { nanoid } from 'nanoid'
|
|
|
|
|
2023-05-16 07:15:37 +02:00
|
|
|
/** @returns {string} */
|
|
|
|
const api_path = path => API_ROOT + path;
|
|
|
|
|
2023-05-05 09:55:40 +02:00
|
|
|
/**
|
|
|
|
* Api root path
|
|
|
|
* @type {string}
|
|
|
|
*/
|
2023-05-16 23:02:20 +02:00
|
|
|
const API_ROOT = window.location.protocol + '//' + window.location.host;
|
|
|
|
// ДЛЯ ПРОДА ПОСТАВИТЬ ЭТО: '//' + window.location.host
|
2023-05-05 09:55:40 +02:00
|
|
|
|
2023-05-15 15:21:13 +02:00
|
|
|
/** OpenID Connect Client Config
|
|
|
|
* @type {import('oidc-client-ts').OidcClientSettings}
|
|
|
|
*/
|
|
|
|
const OIDCConfig = {
|
2023-05-16 07:15:37 +02:00
|
|
|
authority: api_path('/api/auth/vvsu/'),
|
2023-05-15 15:21:13 +02:00
|
|
|
client_id: 'it-hub-client',
|
|
|
|
redirect_uri: 'https://pairent.vvsu.ru/sign-in/',
|
2023-05-16 07:15:37 +02:00
|
|
|
scope: 'openid vvsu_IdUser vvsu_IdEmpl vvsu_IdStud vvsu_login given_name family_name'
|
2023-05-15 15:21:13 +02:00
|
|
|
};
|
|
|
|
|
2023-05-16 07:15:37 +02:00
|
|
|
export default Object.freeze({ API_ROOT, OIDCConfig, api_path });
|