UNPKG

angular-simple-oidc

Version:

Angular Library implementing Open Id Connect specification. Code Flow, Refresh Tokens, Session Management, Discovery Document.

53 lines (52 loc) 2.72 kB
import { TokenStorageService } from './token-storage.service'; import { TokenValidationService, TokenUrlService, LocalState, TokenRequestResult, CreateAuthorizeUrlParams } from 'angular-simple-oidc/core'; import { OidcDiscoveryDocClient } from './discovery-document/oidc-discovery-doc-client.service'; import { TokenEndpointClientService } from './token-endpoint-client.service'; import { Observable } from 'rxjs'; import { DynamicIframeService } from './dynamic-iframe/dynamic-iframe.service'; import { ConfigService } from 'angular-simple-oidc/config'; import { AuthConfig } from './config/models'; import { EventsService } from 'angular-simple-oidc/events'; import { StartCodeFlowParameters } from './models'; export declare class OidcCodeFlowClient { protected readonly window: Window; protected readonly config: ConfigService<AuthConfig>; protected readonly discoveryDocumentClient: OidcDiscoveryDocClient; protected readonly tokenStorage: TokenStorageService; protected readonly tokenValidation: TokenValidationService; protected readonly tokenUrl: TokenUrlService; protected readonly tokenEndpointClient: TokenEndpointClientService; protected readonly events: EventsService; protected readonly dynamicIframe: DynamicIframeService; constructor(window: Window, config: ConfigService<AuthConfig>, discoveryDocumentClient: OidcDiscoveryDocClient, tokenStorage: TokenStorageService, tokenValidation: TokenValidationService, tokenUrl: TokenUrlService, tokenEndpointClient: TokenEndpointClientService, events: EventsService, dynamicIframe: DynamicIframeService); startCodeFlow(options?: StartCodeFlowParameters): Observable<LocalState>; generateCodeFlowMetadata(params: Omit<CreateAuthorizeUrlParams, 'clientId' | 'scope' | 'responseType'>): Observable<{ nonce: string; state: string; codeVerifier: string; codeChallenge: any; url: string; }>; parseCodeFlowCallbackParams(href: string): { href: string; code: string; state: string; error: string; sessionState: string; }; validateCodeFlowCallback(params: { href: string; code: string; state: string; error: string; }, localState: string): void; codeFlowCallback(href: string, redirectUri: string, metadata: { state: string; nonce: string; codeVerifier: string; }): Observable<TokenRequestResult>; currentWindowCodeFlowCallback(): Observable<TokenRequestResult>; requestTokenWithAuthCode(payload: string, nonce: string): Observable<TokenRequestResult>; protected redirectToUrl(url: string): void; protected historyChangeUrl(url: string): void; }