How to use the @delon/auth.DelonAuthModule.forRoot 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 ZhouRenYou / ng-deerway / src / app / app.module.ts View on Github external
import { DelonAuthModule, SimpleInterceptor } from '@delon/auth';
import { DelonACLModule } from '@delon/acl';
registerLocaleData(zh);

@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    CoreModule,
    LayoutModule,
    RoutesModule,
    SharedModule,
    HttpClientModule,
    DelonAuthModule.forRoot(),
    DelonACLModule.forRoot(),
    BrowserAnimationsModule,
  ],
  providers: [
    { provide: HTTP_INTERCEPTORS, useClass: SimpleInterceptor, multi: true },
    { provide: NZ_NOTIFICATION_CONFIG, useValue: { nzMaxStack: 1 } },
    { provide: NZ_I18N, useValue: zh_CN },
    ApiService,
    {
      provide: API_URL,
      useValue: environment.urlPrefix
    }
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

@delon/auth

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

MIT
Latest version published 4 days ago

Package Health Score

85 / 100
Full package analysis