angular-auth-oidc-client
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "angular-auth-oidc-client", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "An OpenID Connect Implicit Flow client for Angular", | ||
@@ -5,0 +5,0 @@ "main": "./bundles/angular-auth-oidc-client.umd.js", |
@@ -31,3 +31,3 @@ # angular-auth-oidc-client | ||
``` javascript | ||
"angular-auth-oidc-client": "1.1.0" | ||
"angular-auth-oidc-client": "1.1.1" | ||
``` | ||
@@ -48,3 +48,3 @@ | ||
import { AuthModule, AuthConfiguration } from 'angular-auth-oidc-client'; | ||
import { AuthModule, OidcSecurityService, OpenIDImplicitFlowConfiguration } from 'angular-auth-oidc-client'; | ||
@@ -60,36 +60,26 @@ @NgModule({ | ||
export class AppModule { | ||
constructor(public authConfiguration: AuthConfiguration, public oidcSecurityService: OidcSecurityService) { | ||
this.authConfiguration.stsServer = 'https://localhost:44318'; | ||
this.authConfiguration.redirect_url = 'https://localhost:44311'; | ||
// The Client MUST validate that the aud (audience) Claim contains its client_id value registered at the Issuer identified by the iss (issuer) Claim as an audience. | ||
// The ID Token MUST be rejected if the ID Token does not list the Client as a valid audience, or if it contains additional audiences not trusted by the Client. | ||
this.authConfiguration.client_id = 'angularclient'; | ||
this.authConfiguration.response_type = 'id_token token'; | ||
this.authConfiguration.scope = 'dataEventRecords securedFiles openid'; | ||
this.authConfiguration.post_logout_redirect_uri = 'https://localhost:44311/Unauthorized'; | ||
this.authConfiguration.start_checksession = false; | ||
this.authConfiguration.silent_renew = true; | ||
this.authConfiguration.startup_route = '/dataeventrecords/list'; | ||
constructor(public oidcSecurityService: OidcSecurityService) { | ||
// *OPTIONAL* - some implementations require you to provide resource (e.g. client id or resource name) along with the request. provide it here. | ||
this.authConfiguration.resource =''; | ||
let openIDImplicitFlowConfiguration = new OpenIDImplicitFlowConfiguration(); | ||
openIDImplicitFlowConfiguration.stsServer = 'https://localhost:44318'; | ||
openIDImplicitFlowConfiguration.redirect_url = 'https://localhost:44311'; | ||
openIDImplicitFlowConfiguration.client_id = 'angularclient'; | ||
openIDImplicitFlowConfiguration.response_type = 'id_token token'; | ||
openIDImplicitFlowConfiguration.scope = 'openid email profile'; | ||
openIDImplicitFlowConfiguration.post_logout_redirect_uri = 'https://localhost:44311/Unauthorized'; | ||
openIDImplicitFlowConfiguration.startup_route = '/home'; | ||
openIDImplicitFlowConfiguration.forbidden_route = '/Forbidden'; | ||
openIDImplicitFlowConfiguration.unauthorized_route = '/Unauthorized'; | ||
openIDImplicitFlowConfiguration.log_console_warning_active = true; | ||
openIDImplicitFlowConfiguration.log_console_debug_active = false; | ||
openIDImplicitFlowConfiguration.max_id_token_iat_offset_allowed_in_seconds = 10; | ||
openIDImplicitFlowConfiguration.override_well_known_configuration = false; | ||
openIDImplicitFlowConfiguration.override_well_known_configuration_url = 'https://localhost:44386/wellknownconfiguration.json'; | ||
// HTTP 403 | ||
this.authConfiguration.forbidden_route = '/Forbidden'; | ||
// HTTP 401 | ||
this.authConfiguration.unauthorized_route = '/Unauthorized'; | ||
this.authConfiguration.log_console_warning_active = true; | ||
this.authConfiguration.log_console_debug_active = false; | ||
// id_token C8: The iat Claim can be used to reject tokens that were issued too far away from the current time, | ||
// limiting the amount of time that nonces need to be stored to prevent attacks.The acceptable range is Client specific. | ||
this.authConfiguration.max_id_token_iat_offset_allowed_in_seconds = 3; | ||
this.oidcSecurityService.setupModule(); | ||
this.oidcSecurityService.setupModule(openIDImplicitFlowConfiguration); | ||
// this.oidcSecurityService.setStorage(localStorage); | ||
} | ||
} | ||
``` | ||
@@ -96,0 +86,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
672375
152