UNPKG

2 kBTypeScriptView Raw
1import { IUri } from "../IUri";
2import { ITenantDiscoveryResponse } from "./ITenantDiscoveryResponse";
3import TelemetryManager from "../telemetry/TelemetryManager";
4/**
5 * @hidden
6 */
7export declare enum AuthorityType {
8 Default = 0,
9 Adfs = 1
10}
11/**
12 * @hidden
13 */
14export declare class Authority {
15 constructor(authority: string, validateAuthority: boolean, authorityMetadata?: ITenantDiscoveryResponse);
16 static isAdfs(authorityUrl: string): boolean;
17 get AuthorityType(): AuthorityType;
18 IsValidationEnabled: boolean;
19 get Tenant(): string;
20 private tenantDiscoveryResponse;
21 get AuthorizationEndpoint(): string;
22 get EndSessionEndpoint(): string;
23 get SelfSignedJwtAudience(): string;
24 private validateResolved;
25 /**
26 * A URL that is the authority set by the developer
27 */
28 get CanonicalAuthority(): string;
29 set CanonicalAuthority(url: string);
30 private canonicalAuthority;
31 private canonicalAuthorityUrlComponents;
32 get CanonicalAuthorityUrlComponents(): IUri;
33 protected get DefaultOpenIdConfigurationEndpoint(): string;
34 /**
35 * Given a string, validate that it is of the form https://domain/path
36 */
37 private validateAsUri;
38 /**
39 * Calls the OIDC endpoint and returns the response
40 */
41 private DiscoverEndpoints;
42 /**
43 * Returns a promise.
44 * Checks to see if the authority is in the cache
45 * Discover endpoints via openid-configuration
46 * If successful, caches the endpoint for later use in OIDC
47 */
48 resolveEndpointsAsync(telemetryManager: TelemetryManager, correlationId: string): Promise<ITenantDiscoveryResponse>;
49 /**
50 * Checks if there is a cached tenant discovery response with required fields.
51 */
52 hasCachedMetadata(): boolean;
53 /**
54 * Returns a promise which resolves to the OIDC endpoint
55 * Only responds with the endpoint
56 */
57 GetOpenIdConfigurationEndpoint(): string;
58}