@trimble-oss/trimble-id
Version:
Trimble Identity SDK for JavaScript/ TypeScript
65 lines • 3.81 kB
TypeScript
import { IEndpointProvider } from "./IEndpointProvider"
/**
* @implements {IEndpointProvider}
* @description FixedEndpointProvider helps to configure the fixed oauth endpoints like authorization_endpoint, token_endpoint, userinfo_endpoint etc.
*/
declare class FixedEndpointProvider implements IEndpointProvider {
/**
* @description Public constructor for FixedEndpointProvider class
* @param {string=} authorizationEndpoint The URL for the Trimble Identity authorization endpoint
* @param {string=} tokenEndpoint The URL for the Trimble Identity token endpoint
* @param {string=} userInfoEndpoint The URL for the Trimble Identity user information endpoint
* @param {string=} tokenRevocationEndpoint The URL for the Trimble Identity token revocation endpoint, if not supplied this is computed relative to the token endpoint
* @param {string=} jwksEndpoint The URL for the Trimble Identity JSON web keyset endpoint
* @remarks All parameters for this constructor are considered obsolete
* @remarks Use fluent extensions when constructing a new instance in the future
*/
constructor(authorizationEndpoint?: string, tokenEndpoint?: string, userInfoEndpoint?: string, /* istanbul ignore next */ tokenRevocationEndpoint?: string, /* istanbul ignore next */ jwksEndpoint?: string);
/**
* @description Add an authorization endpoint
* @param {string} authorizationEndpoint The URL for the Trimble Identity authorization endpoint
* @returns {IEndpointProvider} A new instance of a FixedEndpointProvider
*/
WithAuthorizationEndpoint(authorizationEndpoint: string): IEndpointProvider;
/**
* @description Add a token endpoint
* @param {string} tokenEndpoint The URL for the Trimble Identity token endpoint
* @returns {IEndpointProvider} A new instance of a FixedEndpointProvider
*/
WithTokenEndpoint(tokenEndpoint: string): IEndpointProvider;
/**
* @description Add a user info endpoint
* @param {string} userInfoEndpoint The URL for the Trimble Identity user information endpoint
* @returns {IEndpointProvider} A new instance of a FixedEndpointProvider
*/
WithUserInfoEndpoint(userInfoEndpoint: string): IEndpointProvider;
/**
* @description Add a token revocation endpoint
* @param {string} tokenRevocationEndpoint The URL for the Trimble Identity token revocation endpoint
* @returns {IEndpointProvider} A new instance of a FixedEndpointProvider
*/
WithTokenRevocationEndpoint(tokenRevocationEndpoint: string): IEndpointProvider;
/**
* @description Add an end session endpoint
* @param {string} endSessionEndpoint The URL for the Trimble Identity end session endpoint, if not supplied this is computed relative to the token endpoint
* @returns {IEndpointProvider} A new instance of a FixedEndpointProvider
*/
WithEndSessionEndpoint(endSessionEndpoint: string): IEndpointProvider;
/**
* @description Add a JWKS endpoint
* @param {string} jwksEndpoint The URL for the Trimble Identity JSON web keyset endpoint
* @returns {IEndpointProvider} A new instance of a FixedEndpointProvider
*/
WithJWKSEndpoint(jwksEndpoint: string): IEndpointProvider;
/**
* @description Retrieves a URL for the Trimble Identity authorization endpoint
* @returns {PromiseLike<string>} A Task that resolves to the value of the URL on completion
*/
RetrieveAuthorizationEndpoint(): Promise<string>
RetrieveTokenEndpoint(): Promise<string>
RetrieveUserInfoEndpoint(): Promise<string>
RetrieveTokenRevocationEndpoint(): Promise<string>
RetrieveEndSessionEndpoint(): Promise<string>
RetrieveJSONWebKeySetEndpoint(): Promise<string>
}
export default FixedEndpointProvider