Skip to content

Commit 17b9a46

Browse files
authored
Added state parameter in login request
* issue #262 state parameter in login request * added test cases * removed unused code * updated test cases * updated release version for msal-core
1 parent 138c37c commit 17b9a46

28 files changed

+499
-236
lines changed

lib/msal-angular/samples/MSALAngularDemoApp/src/app/app.module.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {ProductDetailComponent} from './product/product-detail.component'
1111
import {ProductService} from './product/product.service';
1212
import {appRoutes} from './app.routes';
1313
import {HTTP_INTERCEPTORS, HttpClientModule} from "@angular/common/http";
14-
//import {MsalModule, MsalInterceptor} from "@azure/msal-angular";
1514
import {MsalModule} from "../../../../dist/msal.module";
1615
import { MsalInterceptor} from "../../../../dist/msal.interceptor";
1716
import {LogLevel} from "msal";
@@ -48,7 +47,7 @@ protectedResourceMap.set("https://graph.microsoft.com/v1.0/me", ["user.read"]);
4847
navigateToLoginRequestUrl: true,
4948
popUp: true,
5049
consentScopes: [ "user.read", "api://a88bb933-319c-41b5-9f04-eff36d985612/access_as_user"],
51-
unprotectedResources: ["https:google.com"],
50+
unprotectedResources: ["https://www.microsoft.com/en-us/"],
5251
protectedResourceMap: protectedResourceMap,
5352
logger: loggerCallback,
5453
correlationId: '1234',

lib/msal-core/changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 0.2.1
2+
### New Features
3+
* Added State parameter in login request. https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/262
4+
5+
* Removed istanbul code coverage due to webpack bundle size issue.
6+
17
# 0.2.0
28
### New Features
39
Moved npmjs package to @azure/msal

lib/msal-core/dist/msal.js

Lines changed: 55 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/msal-core/dist/msal.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/msal-core/dist/msal.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/msal-core/dist/msal.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/msal-core/docs/classes/_authenticationrequestparameters_.authenticationrequestparameters.html

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ <h3>Accessors</h3>
116116
<h3>Methods</h3>
117117
<ul class="tsd-index-list">
118118
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_authenticationrequestparameters_.authenticationrequestparameters.html#createnavigateurl" class="tsd-kind-icon">create<wbr>Navigate<wbr>Url</a></li>
119+
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_authenticationrequestparameters_.authenticationrequestparameters.html#createnavigationurlstring" class="tsd-kind-icon">create<wbr>Navigation<wbr>Url<wbr>String</a></li>
119120
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_authenticationrequestparameters_.authenticationrequestparameters.html#parsescope" class="tsd-kind-icon">parse<wbr>Scope</a></li>
120121
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_authenticationrequestparameters_.authenticationrequestparameters.html#translateclientidusedinscope" class="tsd-kind-icon">translateclient<wbr>IdUsed<wbr>InScope</a></li>
121122
</ul>
@@ -129,7 +130,7 @@ <h2>Constructors</h2>
129130
<a name="constructor" class="tsd-anchor"></a>
130131
<h3>constructor</h3>
131132
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-external">
132-
<li class="tsd-signature tsd-kind-icon">new <wbr>Authentication<wbr>Request<wbr>Parameters<span class="tsd-signature-symbol">(</span>authority<span class="tsd-signature-symbol">: </span><a href="_authority_.authority.html" class="tsd-signature-type">Authority</a>, clientId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, scope<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Array</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span>, responseType<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, redirectUri<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_authenticationrequestparameters_.authenticationrequestparameters.html" class="tsd-signature-type">AuthenticationRequestParameters</a></li>
133+
<li class="tsd-signature tsd-kind-icon">new <wbr>Authentication<wbr>Request<wbr>Parameters<span class="tsd-signature-symbol">(</span>authority<span class="tsd-signature-symbol">: </span><a href="_authority_.authority.html" class="tsd-signature-type">Authority</a>, clientId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, scope<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Array</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span>, responseType<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, redirectUri<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, state<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_authenticationrequestparameters_.authenticationrequestparameters.html" class="tsd-signature-type">AuthenticationRequestParameters</a></li>
133134
</ul>
134135
<ul class="tsd-descriptions">
135136
<li class="tsd-description">
@@ -155,6 +156,9 @@ <h5>responseType: <span class="tsd-signature-type">string</span></h5>
155156
<li>
156157
<h5>redirectUri: <span class="tsd-signature-type">string</span></h5>
157158
</li>
159+
<li>
160+
<h5>state: <span class="tsd-signature-type">string</span></h5>
161+
</li>
158162
</ul>
159163
<h4 class="tsd-returns-title">Returns <a href="_authenticationrequestparameters_.authenticationrequestparameters.html" class="tsd-signature-type">AuthenticationRequestParameters</a></h4>
160164
</li>
@@ -349,6 +353,29 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</s
349353
</li>
350354
</ul>
351355
</section>
356+
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
357+
<a name="createnavigationurlstring" class="tsd-anchor"></a>
358+
<h3>create<wbr>Navigation<wbr>Url<wbr>String</h3>
359+
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
360+
<li class="tsd-signature tsd-kind-icon">create<wbr>Navigation<wbr>Url<wbr>String<span class="tsd-signature-symbol">(</span>scopes<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Array</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Array</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></li>
361+
</ul>
362+
<ul class="tsd-descriptions">
363+
<li class="tsd-description">
364+
<aside class="tsd-sources">
365+
<ul>
366+
<li>Defined in <a href="https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-core/src/AuthenticationRequestParameters.ts#L77">AuthenticationRequestParameters.ts:77</a></li>
367+
</ul>
368+
</aside>
369+
<h4 class="tsd-parameters-title">Parameters</h4>
370+
<ul class="tsd-parameters">
371+
<li>
372+
<h5>scopes: <span class="tsd-signature-type">Array</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></h5>
373+
</li>
374+
</ul>
375+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Array</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></h4>
376+
</li>
377+
</ul>
378+
</section>
352379
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
353380
<a name="parsescope" class="tsd-anchor"></a>
354381
<h3>parse<wbr>Scope</h3>
@@ -359,7 +386,7 @@ <h3>parse<wbr>Scope</h3>
359386
<li class="tsd-description">
360387
<aside class="tsd-sources">
361388
<ul>
362-
<li>Defined in <a href="https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-core/src/AuthenticationRequestParameters.ts#L116">AuthenticationRequestParameters.ts:116</a></li>
389+
<li>Defined in <a href="https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-core/src/AuthenticationRequestParameters.ts#L120">AuthenticationRequestParameters.ts:120</a></li>
363390
</ul>
364391
</aside>
365392
<h4 class="tsd-parameters-title">Parameters</h4>
@@ -382,7 +409,7 @@ <h3>translateclient<wbr>IdUsed<wbr>InScope</h3>
382409
<li class="tsd-description">
383410
<aside class="tsd-sources">
384411
<ul>
385-
<li>Defined in <a href="https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-core/src/AuthenticationRequestParameters.ts#L103">AuthenticationRequestParameters.ts:103</a></li>
412+
<li>Defined in <a href="https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-core/src/AuthenticationRequestParameters.ts#L107">AuthenticationRequestParameters.ts:107</a></li>
386413
</ul>
387414
</aside>
388415
<h4 class="tsd-parameters-title">Parameters</h4>
@@ -535,6 +562,9 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</spa
535562
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
536563
<a href="_authenticationrequestparameters_.authenticationrequestparameters.html#createnavigateurl" class="tsd-kind-icon">create<wbr>Navigate<wbr>Url</a>
537564
</li>
565+
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
566+
<a href="_authenticationrequestparameters_.authenticationrequestparameters.html#createnavigationurlstring" class="tsd-kind-icon">create<wbr>Navigation<wbr>Url<wbr>String</a>
567+
</li>
538568
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
539569
<a href="_authenticationrequestparameters_.authenticationrequestparameters.html#parsescope" class="tsd-kind-icon">parse<wbr>Scope</a>
540570
</li>

0 commit comments

Comments
 (0)