How to use the @delon/auth.DelonAuthConfig function in @delon/auth

To help you get started, we’ve selected a few @delon/auth examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dotnetcore / OSharp / tests / web / ui / ng-alain7 / src / app / delon.module.ts View on Github external
export function fnDelonAuthConfig(): DelonAuthConfig {
  return {
    ...new DelonAuthConfig(),
    ...{ login_url: '/passport/login', ignores: [/\/login/, /assets\//, /api\/(?!admin)[\w_-]+\/\S*/] } as DelonAuthConfig
  };
}
github dotnetcore / OSharp / tests / web / ui / ng-alain8 / src / app / delon.module.ts View on Github external
export function fnDelonAuthConfig(): DelonAuthConfig {
  return {
    ...new DelonAuthConfig(),
    login_url: '/passport/login',
    ignores: [
      /assets\//,
      /passport\//,
      /api\/(?!admin)[\w_-]+\/\S*/
    ]
  };
}
github dotnetcore / OSharp / tests / web / ui / ng-alain8 / src / app / core / net / refresh-jwt.interceptor.ts View on Github external
intercept(req: HttpRequest, next: HttpHandler): Observable> {
    const options = { ...new DelonAuthConfig(), ...this.injector.get(DelonAuthConfig, undefined) };
    req = this.addToken(req, options, null);

    return next.handle(req).pipe(
      mergeMap((event: any) => {
        if (event instanceof HttpResponseBase) {
          if (event.status === 200 && (event instanceof HttpResponse)) {
            const result: AjaxResult = event.body as AjaxResult;
            if (result && result.Type === AjaxResultType.UnAuth) {
              return this.handle401Error(req, next, options, event);
            }
          }
        }
        return of(event);
      }),
      catchError((error: HttpErrorResponse) => {
        if (error instanceof HttpErrorResponse && error.status === 401) {
github personball / abplus-zero-template / angular / src / app / delon.module.ts View on Github external
export function fnDelonAuthConfig(): DelonAuthConfig {
  return {
    ...new DelonAuthConfig(),
    ...{
      login_url: '/passport/login',
      executeOtherInterceptors: false
    } as DelonAuthConfig
  };
}
github dotnetcore / OSharp / samples / web / ui-clients / ng-alain8 / src / app / delon.module.ts View on Github external
export function fnDelonAuthConfig(): DelonAuthConfig {
  return {
    ...new DelonAuthConfig(),
    login_url: '/passport/login',
    ignores: [
      /assets\//,
      /passport\//,
      /api\/(?!admin)[\w_-]+\/\S*/
    ]
  };
}
github dotnetcore / OSharp / samples / web / ui-clients / ng-alain8 / src / app / core / net / refresh-jwt.interceptor.ts View on Github external
intercept(req: HttpRequest, next: HttpHandler): Observable> {
    const options = { ...new DelonAuthConfig(), ...this.injector.get(DelonAuthConfig, undefined) };
    req = this.addToken(req, options, null);

    return next.handle(req).pipe(
      mergeMap((event: any) => {
        if (event instanceof HttpResponseBase) {
          if (event.status === 200 && (event instanceof HttpResponse)) {
            const result: AjaxResult = event.body as AjaxResult;
            if (result && result.Type === AjaxResultType.UnAuth) {
              return this.handle401Error(req, next, options, event);
            }
          }
        }
        return of(event);
      }),
      catchError((error: HttpErrorResponse) => {
        if (error instanceof HttpErrorResponse && error.status === 401) {
github dotnetcore / Util / sample / Util.Samples.Angular.AntDesign / Typings / app / delon.module.ts View on Github external
export function fnDelonAuthConfig(): DelonAuthConfig {
  return {
    ...new DelonAuthConfig(),
    ...{ login_url: '/passport/login' } as DelonAuthConfig
  };
}

@delon/auth

Simple user authentication, support Json Web Token & Simple Token.

MIT
Latest version published 2 months ago

Package Health Score

84 / 100
Full package analysis