mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-10 04:54:14 +01:00
14 lines
482 B
TypeScript
14 lines
482 B
TypeScript
|
import ssoClient from '../clients/sso-client';
|
||
|
import { AxiosResponse } from 'axios';
|
||
|
import { OpenIdConfiguration } from '../../models/sso';
|
||
|
|
||
|
export default class SsoClient {
|
||
|
/**
|
||
|
* @see https://openid.net/specs/openid-connect-discovery-1_0.html
|
||
|
*/
|
||
|
static async openIdConfiguration (host: string): Promise<OpenIdConfiguration> {
|
||
|
const res: AxiosResponse<OpenIdConfiguration> = await ssoClient(host).get('.well-known/openid-configuration');
|
||
|
return res?.data;
|
||
|
}
|
||
|
}
|