Skip to content

Docs/fix minor comment issues #357

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs-src/silent-refresh.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ <h1 id="refreshing-a-token-when-using-implicit-flow-silent-refresh-">Refreshing
.oauthService
.silentRefresh()
.then(info =&gt; console.debug(&#39;refresh ok&#39;, info))
.catch(err =&gt; console.error(&#39;refresh error&#39;, err));</code></pre><p>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 <code>siletRefreshTimeout</code> (msec). The default value is 20.000 (20 seconds).</p>
.catch(err =&gt; console.error(&#39;refresh error&#39;, err));</code></pre><p>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 <code>silentRefreshTimeout</code> (msec). The default value is 20.000 (20 seconds).</p>
<h3 id="automatically-refreshing-a-token-when-before-it-expires">Automatically refreshing a token when/ before it expires</h3>
<p>To automatically refresh a token when/ some time before it expires, just call the following method after configuring the OAuthService:</p>
<pre class="line-numbers"><code class="language-TypeScript">this.oauthService.setupAutomaticSilentRefresh();</code></pre><p>By default, this event is fired after 75% of the token&#39;s life time is over. You can adjust this factor by setting the property <code>timeoutFactor</code> 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.</p>
Expand Down
2 changes: 0 additions & 2 deletions projects/lib/src/angular-oauth-oidic.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
43 changes: 21 additions & 22 deletions projects/lib/src/auth.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -66,7 +66,6 @@ export class AuthConfig {

/**
* Url of the userinfo endpoint as defined by OpenId Connect.
*
*/
public userinfoEndpoint?: string = null;

Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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;
Expand All @@ -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;

/**
Expand All @@ -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<AuthConfig>) {
Expand Down
Loading