Skip to content

Commit 1e13106

Browse files
committed
session checks
1 parent 3c50797 commit 1e13106

File tree

10 files changed

+388
-351
lines changed

10 files changed

+388
-351
lines changed

angular-oauth2-oidc/docs/js/search/search_index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 115 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,147 @@
11

2-
export interface AuthConfig {
3-
2+
export class AuthConfig {
43
/**
54
* The client's id as registered with the auth server
5+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
66
*/
7-
clientId?: string;
7+
public clientId? = '';
88

99
/**
1010
* The client's redirectUri as registered with the auth server
11+
*
12+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
1113
*/
12-
redirectUri?: string;
14+
public redirectUri? = '';
1315

1416
/**
1517
* An optional second redirectUri where the auth server
1618
* redirects the user to after logging out.
19+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
1720
*/
18-
postLogoutRedirectUri?: string;
21+
public postLogoutRedirectUri? = '';
1922

2023
/**
2124
* The auth server's endpoint that allows to log
2225
* the user in when using implicit flow.
26+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
27+
*
2328
*/
24-
loginUrl?: string;
29+
public loginUrl? = '';
2530

2631
/**
2732
* The requested scopes
33+
*
34+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
35+
*
2836
*/
29-
scope?: string;
37+
public scope? = 'openid profile';
38+
39+
/**
40+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
41+
*/
42+
public resource? = '';
43+
44+
/**
45+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
46+
*/
47+
public rngUrl? = '';
3048

3149
/**
3250
* Defines whether to use OpenId Connect during
33-
* implicit flow. Defaults to true.
51+
* implicit flow.
52+
*
53+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
3454
*/
35-
oidc?: boolean;
55+
public oidc? = true;
3656

3757
/**
3858
* Defines whether to request a access token during
39-
* implicit flow. Defaults to true;
59+
* implicit flow.
60+
*
61+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
62+
*/
63+
public requestAccessToken? = true;
64+
65+
/**
66+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
4067
*/
41-
requestAccessToken?: boolean;
68+
public options?: any;
4269

4370
/**
4471
* The issuer's uri.
72+
*
73+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
4574
*/
46-
issuer?: string;
75+
public issuer? = '';
4776

4877
/**
4978
* The logout url.
79+
*
80+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
5081
*/
51-
logoutUrl?: string;
82+
public logoutUrl? = '';
5283

5384
/**
5485
* Defines whether to clear the hash fragment after logging in.
86+
*
87+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
5588
*/
56-
clearHashAfterLogin?: boolean;
89+
public clearHashAfterLogin? = true;
5790

5891
/**
5992
* Url of the token endpoint as defined by OpenId Connect and OAuth 2.
93+
*
94+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
6095
*/
61-
tokenEndpoint?: string;
96+
public tokenEndpoint?: string;
6297

6398
/**
6499
* Url of the userinfo endpoint as defined by OpenId Connect.
100+
*
101+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
102+
*
65103
*/
66-
userinfoEndpoint?: string;
104+
public userinfoEndpoint?: string;
105+
106+
/**
107+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
108+
*/
109+
public responseType? = 'token';
67110

68111
/**
69112
* Defines whether additional debug information should
70113
* be shown at the console.
114+
*
115+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
71116
*/
72-
showDebugInformation?: boolean;
117+
public showDebugInformation? = false;
73118

74119
/**
75120
* The redirect uri used when doing silent refresh.
121+
*
122+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
76123
*/
77-
silentRefreshRedirectUri?: string;
124+
public silentRefreshRedirectUri? = '';
78125

79-
silentRefreshMessagePrefix?: string;
126+
/**
127+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
128+
*/
129+
public silentRefreshMessagePrefix? = '';
80130

81131
/**
82132
* Set this to true to display the iframe used for
83133
* silent refresh for debugging.
134+
*
135+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
84136
*/
85-
silentRefreshShowIFrame?: boolean;
137+
public silentRefreshShowIFrame? = false;
86138

87139
/**
88140
* Timeout for silent refresh.
141+
*
142+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
89143
*/
90-
siletRefreshTimeout?: number;
144+
public siletRefreshTimeout?: number = 1000 * 20;
91145

92146
/**
93147
* Some auth servers don't allow using password flow
@@ -96,71 +150,100 @@ export interface AuthConfig {
96150
* here. As this passwort is exposed to the public
97151
* it does not bring additional security and is therefore
98152
* as good as using no password.
153+
*
154+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
99155
*/
100-
dummyClientSecret?: string;
156+
public dummyClientSecret?: string;
157+
101158

102159
/**
103160
* Defines whether https is required.
104161
* The default value is remoteOnly which only allows
105162
* http for location, while every other domains need
106163
* to be used with https.
164+
*
165+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
107166
*/
108-
requireHttps?: boolean | 'remoteOnly';
167+
public requireHttps?: boolean | 'remoteOnly' = 'remoteOnly';
109168

110169
/**
111170
* Defines whether every url provided by the discovery
112171
* document has to start with the issuer's url.
172+
*
173+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
113174
*/
114-
strictDiscoveryDocumentValidation?: boolean;
175+
public strictDiscoveryDocumentValidation? = true;
115176

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

123186
/**
124187
* Map with additional query parameter that are appended to
125188
* the request when initializing implicit flow.
189+
*
190+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
126191
*/
127-
customQueryParams?: object;
192+
public customQueryParams?: object;
128193

129-
silentRefreshIFrameName?: string;
194+
/**
195+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
196+
*/
197+
public silentRefreshIFrameName? = 'angular-oauth-oidc-silent-refresh-iframe';
130198

131199
/**
132200
* Defines when the token_timeout event should be raised.
133201
* If you set this to the default value 0.75, the event
134202
* is triggered after 75% of the token's life time.
203+
*
204+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
135205
*/
136-
timeoutFactor?: number;
206+
public timeoutFactor? = 0.75;
137207

138208
/**
139209
* If true, the lib will try to check whether the user
140210
* is still logged in on a regular basis as described
141211
* in http://openid.net/specs/openid-connect-session-1_0.html#ChangeNotification
142212
* @type {boolean}
213+
*
214+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
143215
*/
144-
checkSessionPeriodic?: boolean;
216+
public sessionChecksEnabled? = false;
145217

146218
/**
147219
* Intervall in msec for checking the session
148220
* according to http://openid.net/specs/openid-connect-session-1_0.html#ChangeNotification
149221
* @type {number}
222+
*
223+
* @internal DEPREACTED/ LEGACY. Use method configure instead.
150224
*/
151-
checkSessionIntervall?: number;
225+
public sessionCheckIntervall? = 3 * 1000;
152226

153227
/**
154228
* Url for the iframe used for session checks
155229
* @internal DEPREACTED/ LEGACY. Use method configure instead.
156230
*/
157-
checkSessionIFrameUrl?: string;
231+
public sessionCheckIFrameUrl?: string;
158232

159233
/**
160234
* Name of the iframe to use for session checks
161235
* @type {number}
162236
*
163237
* @internal DEPREACTED/ LEGACY. Use method configure instead.
164238
*/
165-
checkSessionIFrameName?: string;
239+
public sessionCheckIFrameName? = 'angular-oauth-oidc-check-session-iframe';
240+
241+
/**
242+
* This property has been introduced to disable at_hash checks
243+
* and is indented for Identity Provider that does not deliver
244+
* an at_hash EVEN THOUGH its recommended by the OIDC specs.
245+
* Of course, when disabling these checks the we are bypassing
246+
* a security check which means we are more vulnerable.
247+
*/
248+
public disableAtHashCheck? = false;
166249
}

angular-oauth2-oidc/src/default.auth.conf.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)