Skip to content

Commit

Permalink
#96
Browse files Browse the repository at this point in the history
  • Loading branch information
manfredsteyer committed Sep 10, 2017
1 parent 6228d76 commit 63999a9
Show file tree
Hide file tree
Showing 11 changed files with 1,154 additions and 159 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ <h2 id="configuration">Configuration</h2>
scope: &#39;openid profile email voucher&#39;,

// Activate Session Checks:
sessionChecksEnabled: true
sessionChecksEnabled: true,
}</code></pre><h2 id="events">Events</h2>
<p>To get notified, you can hook up for the event <code>session_terminated</code>:</p>
<pre class="line-numbers"><code class="language-TypeScript">this.oauthService.events.filter(e =&gt; e.type === &#39;session_terminated&#39;).subscribe(e =&gt; {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@

<h1 id="using-systemjs">Using SystemJS</h1>
<p>Thanks to <a href="https://github.com/kbeaugrand">Kevin BEAUGRAND</a> for adding this information regarding SystemJS.</p>
<pre class="line-numbers"><code class="language-none">System.config({
<pre class="line-numbers"><code class="language-TypeScript">System.config({
...
meta: {
&#39;angular-oauth2-oidc&#39;: {
Expand Down
1,216 changes: 1,139 additions & 77 deletions angular-oauth2-oidc/docs/classes/AuthConfig.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion angular-oauth2-oidc/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ <h2 id="installing">Installing</h2>

&lt;div&gt;
Username/Passwort zum Testen: max/geheim
&lt;/div&gt;</code></pre><h3 id="calling-a-web-api-with-an-oauth-token">Calling a Web API with an OAuth-Token</h3>
&lt;/div&gt;</code></pre><h3 id="calling-a-web-api-with-an-access-token">Calling a Web API with an Access Token</h3>
<p>Pass this Header to the used method of the <code>Http</code>-Service within an Instance of the class <code>Headers</code>:</p>
<pre class="line-numbers"><code class="language-TypeScript">var headers = new Headers({
&quot;Authorization&quot;: &quot;Bearer &quot; + this.oauthService.getAccessToken()
Expand Down
4 changes: 2 additions & 2 deletions angular-oauth2-oidc/docs/js/search/search_index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion angular-oauth2-oidc/md/session-checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const authConfig: AuthConfig = {
scope: 'openid profile email voucher',

// Activate Session Checks:
sessionChecksEnabled: true
sessionChecksEnabled: true,
}
```

Expand Down
68 changes: 0 additions & 68 deletions angular-oauth2-oidc/src/auth.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,144 +2,98 @@
export class AuthConfig {
/**
* The client's id as registered with the auth server
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public clientId? = '';

/**
* The client's redirectUri as registered with the auth server
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public redirectUri? = '';

/**
* An optional second redirectUri where the auth server
* redirects the user to after logging out.
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public postLogoutRedirectUri? = '';

/**
* The auth server's endpoint that allows to log
* the user in when using implicit flow.
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*
*/
public loginUrl? = '';

/**
* The requested scopes
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*
*/
public scope? = 'openid profile';

/**
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public resource? = '';

/**
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public rngUrl? = '';

/**
* Defines whether to use OpenId Connect during
* implicit flow.
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public oidc? = true;

/**
* Defines whether to request a access token during
* implicit flow.
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public requestAccessToken? = true;

/**
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public options?: any;

/**
* The issuer's uri.
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public issuer? = '';

/**
* The logout url.
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public logoutUrl? = '';

/**
* Defines whether to clear the hash fragment after logging in.
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public clearHashAfterLogin? = true;

/**
* Url of the token endpoint as defined by OpenId Connect and OAuth 2.
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public tokenEndpoint?: string;

/**
* Url of the userinfo endpoint as defined by OpenId Connect.
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*
*/
public userinfoEndpoint?: string;

/**
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public responseType? = 'token';

/**
* Defines whether additional debug information should
* be shown at the console.
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public showDebugInformation? = false;

/**
* The redirect uri used when doing silent refresh.
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public silentRefreshRedirectUri? = '';

/**
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public silentRefreshMessagePrefix? = '';

/**
* Set this to true to display the iframe used for
* silent refresh for debugging.
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public silentRefreshShowIFrame? = false;

/**
* Timeout for silent refresh.
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public siletRefreshTimeout?: number = 1000 * 20;

Expand All @@ -150,8 +104,6 @@ export class AuthConfig {
* here. As this passwort is exposed to the public
* it does not bring additional security and is therefore
* as good as using no password.
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public dummyClientSecret?: string;

Expand All @@ -161,47 +113,34 @@ export class AuthConfig {
* The default value is remoteOnly which only allows
* http for location, while every other domains need
* to be used with https.
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public requireHttps?: boolean | 'remoteOnly' = 'remoteOnly';

/**
* Defines whether every url provided by the discovery
* document has to start with the issuer's url.
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public strictDiscoveryDocumentValidation? = true;

/**
* JSON Web Key Set (https://tools.ietf.org/html/rfc7517)
* with keys used to validate received id_tokens.
* This is taken out of the disovery document. Can be set manually too.
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public jwks?: object;

/**
* Map with additional query parameter that are appended to
* the request when initializing implicit flow.
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public customQueryParams?: object;

/**
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public silentRefreshIFrameName? = 'angular-oauth-oidc-silent-refresh-iframe';

/**
* Defines when the token_timeout event should be raised.
* If you set this to the default value 0.75, the event
* is triggered after 75% of the token's life time.
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public timeoutFactor? = 0.75;

Expand All @@ -210,31 +149,24 @@ export class AuthConfig {
* is still logged in on a regular basis as described
* in http://openid.net/specs/openid-connect-session-1_0.html#ChangeNotification
* @type {boolean}
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public sessionChecksEnabled? = false;

/**
* Intervall in msec for checking the session
* according to http://openid.net/specs/openid-connect-session-1_0.html#ChangeNotification
* @type {number}
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public sessionCheckIntervall? = 3 * 1000;

/**
* Url for the iframe used for session checks
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public sessionCheckIFrameUrl?: string;

/**
* Name of the iframe to use for session checks
* @type {number}
*
* @internal DEPREACTED/ LEGACY. Use method configure instead.
*/
public sessionCheckIFrameName? = 'angular-oauth-oidc-check-session-iframe';

Expand Down
2 changes: 1 addition & 1 deletion angular-oauth2-oidc/src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-oauth2-oidc",
"version": "2.1.0",
"version": "2.1.1",
"repository": {
"type": "git",
"url": "https://github.com/manfredsteyer/angular-oauth2-oidc"
Expand Down
2 changes: 1 addition & 1 deletion sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@angular/platform-browser": "^4.2.4",
"@angular/platform-browser-dynamic": "^4.2.4",
"@angular/router": "^4.2.4",
"angular-oauth2-oidc": "^2.0.15",
"angular-oauth2-oidc": "^2.1.1",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"rxjs": "^5.4.2",
Expand Down
12 changes: 7 additions & 5 deletions sample/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import { authConfig } from './auth.config';
import {NgModule} from '@angular/core';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {HttpModule} from '@angular/http';
import {BrowserModule} from '@angular/platform-browser';
import {JwksValidationHandler, OAuthModule, ValidationHandler} from 'angular-oauth2-oidc';
import {AuthConfig, JwksValidationHandler, OAuthModule, ValidationHandler} from 'angular-oauth2-oidc';

import {AppComponent} from './app.component';
import {AppRouterModule} from './app.routes';
import {BASE_URL} from './app.tokens';
import {FlightHistoryComponent} from './flight-history/flight-history.component';
import {HomeComponent} from './home/home.component';
import {PasswordFlowLoginComponent} from './password-flow-login/password-flow-login.component';
import {SharedModule} from './shared/shared.module';
import { PasswordFlowLoginComponent } from './password-flow-login/password-flow-login.component';

@NgModule({
imports: [
Expand All @@ -26,11 +27,12 @@ import { PasswordFlowLoginComponent } from './password-flow-login/password-flow-
declarations: [
AppComponent,
HomeComponent,
FlightHistoryComponent,
PasswordFlowLoginComponent
FlightHistoryComponent
,
PasswordFlowLoginComponent
],
providers: [
// {provide: AUTH_CONFIG, useValue: authConfig },
// {provide: AuthConfig, useValue: authConfig },
// { provide: OAuthStorage, useClass: DemoStorage },
// { provide: ValidationHandler, useClass: JwksValidationHandler },
{ provide: BASE_URL, useValue: "http://www.angular.at" }
Expand Down
1 change: 0 additions & 1 deletion sample/src/app/auth.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ export const authConfig: AuthConfig = {
showDebugInformation: true,

sessionChecksEnabled: true

}

0 comments on commit 63999a9

Please sign in to comment.