Skip to content

Commit

Permalink
last tests for v8
Browse files Browse the repository at this point in the history
  • Loading branch information
manfredsteyer committed Jul 18, 2019
1 parent 4ee15b9 commit 4cd99d6
Show file tree
Hide file tree
Showing 67 changed files with 9,315 additions and 6,976 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@







Expand Down
1 change: 1 addition & 0 deletions docs/additional-documentation/callback-after-login.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@







Expand Down
1 change: 1 addition & 0 deletions docs/additional-documentation/code-flow-+-pcke.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@







Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@







Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@








<h1 id="configure-library-for-implicit-flow-without-discovery-document-">Configure Library for Implicit Flow (without discovery document)</h1>
<h1 id="configure-library-for-implicit-flow-without-discovery-document">Configure Library for Implicit Flow (without discovery document)</h1>
<p>When you don&#39;t have a discovery document, you have to configure more properties manually:</p>
<p>Please note that the following sample uses the original config API. For information about the new config API have a look to the project&#39;s README above.</p>
<div><pre class="line-numbers"><code class="language-TypeScript">&#64;Component({ ... })
Expand Down
1 change: 1 addition & 0 deletions docs/additional-documentation/custom-query-parameters.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@







Expand Down
1 change: 1 addition & 0 deletions docs/additional-documentation/events.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@







Expand Down
1 change: 1 addition & 0 deletions docs/additional-documentation/getting-started.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@







Expand Down
1 change: 1 addition & 0 deletions docs/additional-documentation/original-config-api.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@







Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@








<h1 id="preserving-state-like-the-requested-url-">Preserving State (like the Requested URL)</h1>
<h1 id="preserving-state-like-the-requested-url">Preserving State (like the Requested URL)</h1>
<p>When calling <code>initImplicitFlow</code>, you can pass an optional state which could be the requested url:</p>
<div><pre class="line-numbers"><code class="language-TypeScript">this.oauthService.initImplicitFlow(&#39;http://www.myurl.com/x/y/z&#39;);</code></pre></div><p>After login succeeded, you can read this state:</p>
<div><pre class="line-numbers"><code class="language-TypeScript">this.oauthService.tryLogin({
Expand Down
7 changes: 4 additions & 3 deletions docs/additional-documentation/refreshing-a-token.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@








<h1 id="refreshing-a-token">Refreshing a Token</h1>
<p>The strategy to use for refreshing your token differs between implicit flow and code flow. Hence, you find here one separate section for both of them.</p>
<p>The last section shows how to automate refreshing for both flows.</p>
<h2 id="refreshing-when-using-code-flow-not-implicit-flow-">Refreshing when using Code Flow (not Implicit Flow!)</h2>
<h2 id="refreshing-when-using-code-flow-not-implicit-flow">Refreshing when using Code Flow (not Implicit Flow!)</h2>
<blockquote>
<blockquote>
<p>For refreshing a token with implicit flow, please see section below!</p>
Expand All @@ -59,7 +60,7 @@ <h2 id="refreshing-when-using-code-flow-not-implicit-flow-">Refreshing when usin
<p>When using code flow, you can get an <code>refresh_token</code>. While the original standard DOES NOT allow this for SPAs, the mentioned document proposes to ease this limitation. However, it specifies a list of requirements one should take care about before using refresh_tokens. Please make sure you respect those requirements.</p>
<p>Please also note, that you have to request the <code>offline_access</code> scope to get an refresh token.</p>
<p>To refresh your token, just call the <code>refresh</code> method:</p>
<div><pre class="line-numbers"><code class="language-typescript">this.oauthService.refresh();</code></pre></div><h2 id="refreshing-when-using-implicit-flow-not-code-flow-">Refreshing when using Implicit Flow (not Code Flow!)</h2>
<div><pre class="line-numbers"><code class="language-typescript">this.oauthService.refresh();</code></pre></div><h2 id="refreshing-when-using-implicit-flow-not-code-flow">Refreshing when using Implicit Flow (not Code Flow!)</h2>
<p>To refresh your tokens when using implicit flow you can use a silent refresh. This is a well-known solution that compensates the fact that implicit flow does not allow for issuing a refresh token. It uses a hidden iframe to get another token from the auth server. When the user is there still logged in (by using a cookie) it will respond without user interaction and provide new tokens.</p>
<p>To use this approach, setup a redirect uri for the silent refresh.</p>
<p>For this, you can set the property silentRefreshRedirectUri in the config object:</p>
Expand Down Expand Up @@ -103,7 +104,7 @@ <h2 id="refreshing-when-using-code-flow-not-implicit-flow-">Refreshing when usin
.silentRefresh()
.then(info =&gt; console.debug(&#39;refresh ok&#39;, info))
.catch(err =&gt; console.error(&#39;refresh error&#39;, err));</code></pre></div><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-code-flow-and-implicit-flow-">Automatically refreshing a token when/ before it expires (Code Flow and Implicit Flow)</h3>
<h3 id="automatically-refreshing-a-token-when-before-it-expires-code-flow-and-implicit-flow">Automatically refreshing a token when/ before it expires (Code Flow and Implicit Flow)</h3>
<p>To automatically refresh a token when/ some time before it expires, just call the following method after configuring the OAuthService:</p>
<div><pre class="line-numbers"><code class="language-TypeScript">this.oauthService.setupAutomaticSilentRefresh();</code></pre></div><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
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@







Expand Down
1 change: 1 addition & 0 deletions docs/additional-documentation/server-side-rendering.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@







Expand Down
1 change: 1 addition & 0 deletions docs/additional-documentation/session-checks.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@







Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@







Expand Down
7 changes: 4 additions & 3 deletions docs/additional-documentation/using-password-flow.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@







Expand All @@ -51,7 +52,7 @@ <h1 id="using-password-flow">Using Password-Flow</h1>
<p>This section shows how to use the password flow, which demands the user to directly enter his or her password into the client.</p>
<p>Please note that from an OAuth2/OIDC perspective, the implicit flow is better suited for logging into a SPA and the flow described here should only be used,
when a) there is a strong trust relations ship between the client and the auth server and when b) other flows are not possible.</p>
<h2 id="configure-library-for-password-flow-using-discovery-document-">Configure Library for Password Flow (using discovery document)</h2>
<h2 id="configure-library-for-password-flow-using-discovery-document">Configure Library for Password Flow (using discovery document)</h2>
<p>To configure the library you just have to set some properties on startup. For this, the following sample uses the constructor of the AppComponent which is called before routing kicks in.</p>
<p>Please not, that this configuration is quite similar to the one for the implcit flow.</p>
<div><pre class="line-numbers"><code class="language-TypeScript">&#64;Component({ ... })
Expand Down Expand Up @@ -85,7 +86,7 @@ <h2 id="configure-library-for-password-flow-using-discovery-document-">Configure

}

}</code></pre></div><h2 id="configure-library-for-password-flow-without-discovery-document-">Configure Library for Password Flow (without discovery document)</h2>
}</code></pre></div><h2 id="configure-library-for-password-flow-without-discovery-document">Configure Library for Password Flow (without discovery document)</h2>
<p>In cases where you don&#39;t have an OIDC based discovery document you have to configure some more properties manually:</p>
<div><pre class="line-numbers"><code class="language-TypeScript">&#64;Component({ ... })
export class AppComponent {
Expand Down Expand Up @@ -116,7 +117,7 @@ <h2 id="configure-library-for-password-flow-using-discovery-document-">Configure

}

}</code></pre></div><h2 id="fetching-an-access-token-by-providing-the-current-user-s-credentials">Fetching an Access Token by providing the current user&#39;s credentials</h2>
}</code></pre></div><h2 id="fetching-an-access-token-by-providing-the-current-users-credentials">Fetching an Access Token by providing the current user&#39;s credentials</h2>
<div><pre class="line-numbers"><code class="language-TypeScript">this.oauthService.fetchTokenUsingPasswordFlow(&#39;max&#39;, &#39;geheim&#39;).then((resp) =&gt; {

// Loading data about the user
Expand Down
1 change: 1 addition & 0 deletions docs/additional-documentation/using-systemjs.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@







Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@







Expand Down
3 changes: 2 additions & 1 deletion docs/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<h1 id="change-log">Change Log</h1>
<h2 id="lates-features">Lates features</h2>
<p>See <a href="https://github.com/manfredsteyer/angular-oauth2-oidc/releases">Release Notes</a></p>
<h2 id="new-features-in-version-2-1">New Features in Version 2.1</h2>
<h2 id="new-features-in-version-21">New Features in Version 2.1</h2>
<ul>
<li>New Config API (the original one is still supported)</li>
<li>New convenience methods in OAuthService to streamline default tasks:<ul>
Expand Down Expand Up @@ -74,6 +74,7 @@ <h2 id="breaking-changes-in-version-2">Breaking Changes in Version 2</h2>







Expand Down
Loading

0 comments on commit 4cd99d6

Please sign in to comment.