8.2.1 • Published 5 years ago
@bmat/angular-authentication v8.2.1
@bmat/angular-authentication
This Angular module configures an AuthService that will take care of:
- Parsing callbacks,
- Requesting SSO authentications,
- Polling session data, both to invalidae and renew sessions.
Usage
To enable authentication in the SPA, you need to import the module,
@NgModule({
imports: [
...other imports,
AuthenticationModule.forRoot({
tokenGetter,
webCustomData: Auth0LockOptions,
authOptions: WebAuthOptions,
}),
],
...
})
export AppModule {}
If you need to call an API with the token, you need to add the interceptors
with the same tokenGetter function. The recommended way is to use the dependency
@auth0/angular-jwt
:
@NgModule({
imports: [
...other imports,
JwtModule.forRoot({
config: {
tokenGetter,
whitelistedDomains: [
new RegExp('bmat.com'),
new RegExp('localhost'),
new RegExp('^null$'),
],
},
}),
],
...
})
export AppModule {}
Import the JwtModule
after AuthenticationModule
if you require additional options.
Guards
The module exports AuthenticatedGuard
. If the user is not logged when accessing a guarded route, it will call
the logout functions.
8.2.1
5 years ago
8.2.0
5 years ago
8.0.2-rc.1
5 years ago
8.0.1
5 years ago
8.0.0
5 years ago
7.1.0-beta.3
5 years ago
7.0.1
6 years ago
7.0.0
6 years ago
6.1.0-alpha.11
6 years ago
6.1.0-alpha.10
6 years ago
6.1.0-alpha.9
6 years ago
6.1.0-alpha.8
6 years ago
6.1.0-alpha.6
6 years ago
6.1.0-alpha.4
6 years ago
6.1.0-alpha.3
6 years ago
6.1.0-alpha.2
6 years ago
6.1.0-alpha.1
6 years ago
1.0.0
6 years ago