Skip to content

Instantly share code, notes, and snippets.

View mikecabana's full-sized avatar
✌️
dilly dallying

Michael Cabana mikecabana

✌️
dilly dallying
View GitHub Profile
@mikecabana
mikecabana / authorization-token-interceptor.service.ts
Last active January 16, 2019 09:31 — forked from danielcrisp/token.interceptor.ts
Authorization Token Interceptor Service - Async HTTP Interceptors | Angular 6.x | rxjs 6.x
import { Injectable } from '@angular/core';
import { HttpErrorResponse, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
import { Observable } from 'rxjs';
import { mergeMap } from 'rxjs/operators';
import { User } from 'oidc-client';
import { AuthService } from './oidc-auth.service.ts';
@Injectable({
providedIn: 'root'
@mikecabana
mikecabana / oidc-auth.service.ts
Last active August 8, 2018 13:58 — forked from danielcrisp/auth.service.ts
Oidc Client Authorization Service - Async HTTP Interceptors | Angular 6.x | rxjs 6.x
import { Injectable } from '@angular/core';
import { UserManager, User } from 'oidc-client';
import { Observable, from } from 'rxjs';
@Injectable({
providedin: 'root'
})
export class AuthService {
private userManager: UserManager;