Skip to content

Commit

Permalink
Added state parameter in login request
Browse files Browse the repository at this point in the history
* issue #262 state parameter in login request

* added test cases

* removed unused code

* updated test cases

* updated release version for msal-core
  • Loading branch information
nehaagrawal committed Aug 14, 2018
1 parent 138c37c commit 17b9a46
Show file tree
Hide file tree
Showing 28 changed files with 499 additions and 236 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {ProductDetailComponent} from './product/product-detail.component'
import {ProductService} from './product/product.service';
import {appRoutes} from './app.routes';
import {HTTP_INTERCEPTORS, HttpClientModule} from "@angular/common/http";
//import {MsalModule, MsalInterceptor} from "@azure/msal-angular";
import {MsalModule} from "../../../../dist/msal.module";
import { MsalInterceptor} from "../../../../dist/msal.interceptor";
import {LogLevel} from "msal";
Expand Down Expand Up @@ -48,7 +47,7 @@ protectedResourceMap.set("https://graph.microsoft.com/v1.0/me", ["user.read"]);
navigateToLoginRequestUrl: true,
popUp: true,
consentScopes: [ "user.read", "api://a88bb933-319c-41b5-9f04-eff36d985612/access_as_user"],
unprotectedResources: ["https:google.com"],
unprotectedResources: ["https://www.microsoft.com/en-us/"],
protectedResourceMap: protectedResourceMap,
logger: loggerCallback,
correlationId: '1234',
Expand Down
6 changes: 6 additions & 0 deletions lib/msal-core/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.2.1
### New Features
* Added State parameter in login request. https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/262

* Removed istanbul code coverage due to webpack bundle size issue.

# 0.2.0
### New Features
Moved npmjs package to @azure/msal
Expand Down
89 changes: 55 additions & 34 deletions lib/msal-core/dist/msal.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/msal-core/dist/msal.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions lib/msal-core/dist/msal.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/msal-core/dist/msal.min.js.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ <h3>Accessors</h3>
<h3>Methods</h3>
<ul class="tsd-index-list">
<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>
<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>
<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>
<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>
</ul>
Expand All @@ -129,7 +130,7 @@ <h2>Constructors</h2>
<a name="constructor" class="tsd-anchor"></a>
<h3>constructor</h3>
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-external">
<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>
<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>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
Expand All @@ -155,6 +156,9 @@ <h5>responseType: <span class="tsd-signature-type">string</span></h5>
<li>
<h5>redirectUri: <span class="tsd-signature-type">string</span></h5>
</li>
<li>
<h5>state: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="_authenticationrequestparameters_.authenticationrequestparameters.html" class="tsd-signature-type">AuthenticationRequestParameters</a></h4>
</li>
Expand Down Expand Up @@ -349,6 +353,29 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</s
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="createnavigationurlstring" class="tsd-anchor"></a>
<h3>create<wbr>Navigation<wbr>Url<wbr>String</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<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>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<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>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<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>
</li>
</ul>
<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>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="parsescope" class="tsd-anchor"></a>
<h3>parse<wbr>Scope</h3>
Expand All @@ -359,7 +386,7 @@ <h3>parse<wbr>Scope</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<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>
<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>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -382,7 +409,7 @@ <h3>translateclient<wbr>IdUsed<wbr>InScope</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<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>
<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>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -535,6 +562,9 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</spa
<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>
<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>
<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>
Expand Down
Loading

0 comments on commit 17b9a46

Please sign in to comment.