UNPKG

@kephas/ngx-oidc

Version:

Provides the integration of the OIDC API with Kephas and Angular 12+.

34 lines (33 loc) 1.24 kB
import { HttpHandler, HttpEvent, HttpRequest, HttpInterceptor } from '@angular/common/http'; import { Observable } from 'rxjs'; import { AuthenticationService } from './authentication.service'; import * as i0 from "@angular/core"; /** * Interceptor handling the authorization. * * @export * @class AuthorizeInterceptor * @implements {HttpInterceptor} */ export declare class AuthorizeInterceptor implements HttpInterceptor { private authorize; /** * Creates an instance of AuthorizeInterceptor. * @param {AuthenticationService} authorize The authorization service. * @memberof AuthorizeInterceptor */ constructor(authorize: AuthenticationService); /** * Intercepts the request. * * @param {HttpRequest<any>} request * @param {HttpHandler} next * @return {*} {Observable<HttpEvent<any>>} * @memberof AuthorizeInterceptor */ intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>; private processRequestWithToken; private isSameOriginUrl; static ɵfac: i0.ɵɵFactoryDeclaration<AuthorizeInterceptor, never>; static ɵprov: i0.ɵɵInjectableDeclaration<AuthorizeInterceptor>; }