diff --git a/docs-src/silent-refresh.md b/docs-src/silent-refresh.md
index cbc6b39d..0fba058f 100644
--- a/docs-src/silent-refresh.md
+++ b/docs-src/silent-refresh.md
@@ -70,7 +70,7 @@ this
.catch(err => console.error('refresh error', err));
```
-When there is an error in the iframe that prevents the communication with the main application, silentRefresh will give you a timeout. To configure the timespan for this, you can set the property ``siletRefreshTimeout`` (msec). The default value is 20.000 (20 seconds).
+When there is an error in the iframe that prevents the communication with the main application, silentRefresh will give you a timeout. To configure the timespan for this, you can set the property ``silentRefreshTimeout`` (msec). The default value is 20.000 (20 seconds).
### Automatically refreshing a token when/ before it expires
diff --git a/docs/additional-documentation/refreshing-a-token-(silent-refresh).html b/docs/additional-documentation/refreshing-a-token-(silent-refresh).html
index 5d2c6f52..6f47bb43 100644
--- a/docs/additional-documentation/refreshing-a-token-(silent-refresh).html
+++ b/docs/additional-documentation/refreshing-a-token-(silent-refresh).html
@@ -655,7 +655,7 @@
When there is an error in the iframe that prevents the communication with the main application, silentRefresh will give you a timeout. To configure the timespan for this, you can set the property siletRefreshTimeout (msec). The default value is 20.000 (20 seconds).
When there is an error in the iframe that prevents the communication with the main application, silentRefresh will give you a timeout. To configure the timespan for this, you can set the property silentRefreshTimeout (msec). The default value is 20.000 (20 seconds).
Automatically refreshing a token when/ before it expires
To automatically refresh a token when/ some time before it expires, just call the following method after configuring the OAuthService:
this.oauthService.setupAutomaticSilentRefresh();
By default, this event is fired after 75% of the token's life time is over. You can adjust this factor by setting the property timeoutFactor to a value between 0 and 1. For instance, 0.5 means, that the event is fired after half of the life time is over and 0.33 triggers the event after a third.
diff --git a/projects/lib/src/angular-oauth-oidic.module.ts b/projects/lib/src/angular-oauth-oidic.module.ts
index 54c273d0..3c539b5c 100644
--- a/projects/lib/src/angular-oauth-oidic.module.ts
+++ b/projects/lib/src/angular-oauth-oidic.module.ts
@@ -33,8 +33,6 @@ export class OAuthModule {
config: OAuthModuleConfig = null,
validationHandlerClass = NullValidationHandler
): ModuleWithProviders {
- // const setupInterceptor = config && config.resourceServer && config.resourceServer.allowedUrls;
-
return {
ngModule: OAuthModule,
providers: [
diff --git a/projects/lib/src/auth.config.ts b/projects/lib/src/auth.config.ts
index 39dd2839..5f578c0f 100644
--- a/projects/lib/src/auth.config.ts
+++ b/projects/lib/src/auth.config.ts
@@ -37,7 +37,7 @@ export class AuthConfig {
public oidc? = true;
/**
- * Defines whether to request a access token during
+ * Defines whether to request an access token during
* implicit flow.
*/
public requestAccessToken? = true;
@@ -66,7 +66,6 @@ export class AuthConfig {
/**
* Url of the userinfo endpoint as defined by OpenId Connect.
- *
*/
public userinfoEndpoint?: string = null;
@@ -107,9 +106,9 @@ export class AuthConfig {
/**
* Some auth servers don't allow using password flow
- * w/o a client secreat while the standards do not
+ * w/o a client secret while the standards do not
* demand for it. In this case, you can set a password
- * here. As this passwort is exposed to the public
+ * here. As this password is exposed to the public
* it does not bring additional security and is therefore
* as good as using no password.
*/
@@ -159,7 +158,7 @@ export class AuthConfig {
public sessionChecksEnabled? = false;
/**
- * Intervall in msec for checking the session
+ * Interval in msec for checking the session
* according to http://openid.net/specs/openid-connect-session-1_0.html#ChangeNotification
*/
public sessionCheckIntervall? = 3 * 1000;
@@ -183,18 +182,18 @@ export class AuthConfig {
*/
public disableAtHashCheck? = false;
- /*
- * Defines wether to check the subject of a refreshed token after silent refresh.
- * Normally, it should be the same as before.
- */
+ /**
+ * Defines wether to check the subject of a refreshed token after silent refresh.
+ * Normally, it should be the same as before.
+ */
public skipSubjectCheck? = false;
public useIdTokenHintForSilentRefresh? = false;
- /*
- * Defined whether to skip the validation of the issuer in the discovery document.
- * Normally, the discovey document's url starts with the url of the issuer.
- */
+ /**
+ * Defined whether to skip the validation of the issuer in the discovery document.
+ * Normally, the discovey document's url starts with the url of the issuer.
+ */
public skipIssuerCheck? = false;
/**
@@ -204,17 +203,17 @@ export class AuthConfig {
*/
public fallbackAccessTokenExpirationTimeInSec?: number;
- /*
- * final state sent to issuer is built as follows:
- * state = nonce + nonceStateSeparator + additional state
- * Default separator is ';' (encoded %3B).
- * In rare cases, this character might be forbidden or inconvenient to use by the issuer so it can be customized.
- */
+ /**
+ * final state sent to issuer is built as follows:
+ * state = nonce + nonceStateSeparator + additional state
+ * Default separator is ';' (encoded %3B).
+ * In rare cases, this character might be forbidden or inconvenient to use by the issuer so it can be customized.
+ */
public nonceStateSeparator? = ';';
- /*
- * set this to true to use HTTP BASIC auth for password flow
- */
+ /**
+ * Set this to true to use HTTP BASIC auth for password flow
+ */
public useHttpBasicAuthForPasswordFlow? = false;
constructor(json?: Partial) {
diff --git a/projects/lib/src/oauth-service.ts b/projects/lib/src/oauth-service.ts
index 655620c8..efe38455 100644
--- a/projects/lib/src/oauth-service.ts
+++ b/projects/lib/src/oauth-service.ts
@@ -34,8 +34,8 @@ import { WebHttpUrlEncodingCodec } from './encoder';
*/
@Injectable()
export class OAuthService extends AuthConfig {
- // extending AuthConfig ist just for LEGACY reasons
- // to not break existing code
+ // Extending AuthConfig ist just for LEGACY reasons
+ // to not break existing code.
/**
* The ValidationHandler used to validate received
@@ -57,7 +57,7 @@ export class OAuthService extends AuthConfig {
/**
* Informs about events, like token_received or token_expires.
- * See the string enum EventType for a full list of events.
+ * See the string enum EventType for a full list of event types.
*/
public events: Observable;
@@ -65,12 +65,10 @@ export class OAuthService extends AuthConfig {
* The received (passed around) state, when logging
* in with implicit flow.
*/
- public state?= '';
+ public state? = '';
private eventsSubject: Subject = new Subject();
- private discoveryDocumentLoadedSubject: Subject