Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose the full AuthResponse details #107

Merged
merged 14 commits into from
Jul 25, 2019
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Clean up and replace travis with azure pipelines [`#73`](https://github.com/syncweek-react-aad/react-aad/pull/73)
- Added option for redirctUri to authProvider [`#56`](https://github.com/syncweek-react-aad/react-aad/pull/56)
- Update README.md with disclaimer [`#60`](https://github.com/syncweek-react-aad/react-aad/pull/60)
- Changing the order that dispatch and authentiationState are handled [Issue #53] [`#57`](https://github.com/syncweek-react-aad/react-aad/pull/57)
- Changing the order that dispatch and authentiationState are handled [Issue #53][`#57`](https://github.com/syncweek-react-aad/react-aad/pull/57)
- Move AzureAD component to its own file [`#51`](https://github.com/syncweek-react-aad/react-aad/pull/51)
- Refactor MSAL-specific configuration options into seperate prop [`#50`](https://github.com/syncweek-react-aad/react-aad/pull/50)
- Exporting AAD_LOGOUT_SUCCESS [Issue #48] [`#49`](https://github.com/syncweek-react-aad/react-aad/pull/49)
- Exporting AAD_LOGOUT_SUCCESS [Issue #48][`#49`](https://github.com/syncweek-react-aad/react-aad/pull/49)
- Refactor MSAL code out of AzureAD Component [`#45`](https://github.com/syncweek-react-aad/react-aad/pull/45)
- update to use GitHub credentials instead of VSTS [`#43`](https://github.com/syncweek-react-aad/react-aad/pull/43)
- feat(login persistence) component recognizes when a user is logged in after refresh [`#41`](https://github.com/syncweek-react-aad/react-aad/pull/41)
Expand All @@ -53,7 +53,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Update NPM dependencies to fix all detected security vulnerabilities, and enable all new MSAL options to be used. [`cc53b06`](https://github.com/syncweek-react-aad/react-aad/commit/cc53b06513e92601545cea80636ef9cf364914f0)
- Remove package.lock.json to allow for merge [`08eb5ff`](https://github.com/syncweek-react-aad/react-aad/commit/08eb5ffd5a3ca753ba688c87bb4ca3d3373352d5)
- Update react-dom npm and address PR comment [`d621de8`](https://github.com/syncweek-react-aad/react-aad/commit/d621de879402fe1d7cde5b4f66f2d073200b2f16)
- Adding prettier, format files, and badges [`3a8b42e`](https://github.com/syncweek-react-aad/react-aad/commit/3a8b42eda16f142c9dd55cf0ad21ab7f4d7dac55)
- Adding prettier, format files, and badges [`3a8b42e`](https://github.com/syncweek-react-aad/react-aad/commit/3a8b42eda16f142c9dd55cf0ad21ab7f4d7dac55)
- Fix unit tests [`b2259b8`](https://github.com/syncweek-react-aad/react-aad/commit/b2259b828eb8415887548b0467d7d38230e4a9d5)
- Male all the callback props on the AzureAD component optional [`23824c1`](https://github.com/syncweek-react-aad/react-aad/commit/23824c1476a296d64863b06ca2b777e380a71fd4)
- Merge with latest CI changes from Master [`b20bf1f`](https://github.com/syncweek-react-aad/react-aad/commit/b20bf1fb755f4f04f7bc54fcf015562de79d96d1)
Expand All @@ -80,14 +80,14 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

- remove clean, corrected skip ci to ci skip [`#30`](https://github.com/syncweek-react-aad/react-aad/pull/30)
- Updating Travis Settings [`#28`](https://github.com/syncweek-react-aad/react-aad/pull/28)
- added buttons to switch between samples [Issue #9] [`#24`](https://github.com/syncweek-react-aad/react-aad/pull/24)
- added buttons to switch between samples [Issue #9][`#24`](https://github.com/syncweek-react-aad/react-aad/pull/24)
- enabling travis build [`#25`](https://github.com/syncweek-react-aad/react-aad/pull/25)
- Removed use of symlink and pointed to react-aad-msal module through [Issue #15 & #18] [`#22`](https://github.com/syncweek-react-aad/react-aad/pull/22)
- Adding AAD_LOGOUT_SUCCESS case to reduxStore.js [Issue #20] [`#21`](https://github.com/syncweek-react-aad/react-aad/pull/21)
- Setting tsconfig to exclude sample folder [Issue #10] [`#17`](https://github.com/syncweek-react-aad/react-aad/pull/17)
- Updating READMEs [Issue #11] [`#16`](https://github.com/syncweek-react-aad/react-aad/pull/16)
- Removed use of symlink and pointed to react-aad-msal module through [Issue #15 & #18][`#22`](https://github.com/syncweek-react-aad/react-aad/pull/22)
- Adding AAD_LOGOUT_SUCCESS case to reduxStore.js [Issue #20][`#21`](https://github.com/syncweek-react-aad/react-aad/pull/21)
- Setting tsconfig to exclude sample folder [Issue #10][`#17`](https://github.com/syncweek-react-aad/react-aad/pull/17)
- Updating READMEs [Issue #11][`#16`](https://github.com/syncweek-react-aad/react-aad/pull/16)
- added microsoft copyright statement / mit license to files [`#14`](https://github.com/syncweek-react-aad/react-aad/pull/14)
- Added sample application [`#12`](https://github.com/syncweek-react-aad/react-aad/pull/12)
- Added sample application [`#12`](https://github.com/syncweek-react-aad/react-aad/pull/12)
- Fix Redirect LoginType to authenticate [`#4`](https://github.com/syncweek-react-aad/react-aad/pull/4)
- Updating README to add component property details [`#2`](https://github.com/syncweek-react-aad/react-aad/pull/2)
- Moving sync week project from VSTS to GH. [`#1`](https://github.com/syncweek-react-aad/react-aad/pull/1)
Expand All @@ -112,13 +112,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Initial commit [`69e4fae`](https://github.com/syncweek-react-aad/react-aad/commit/69e4fae425b3599dd4bf3146b0654aa3bf867f53)
- add npm run start-dev to contributing guidelines [`3e69d3e`](https://github.com/syncweek-react-aad/react-aad/commit/3e69d3e18d0a6d4ef9ff12350b1cc23b3fc3e0c3)
- Update README [`c47f280`](https://github.com/syncweek-react-aad/react-aad/commit/c47f28052fb1ce9293691b865520d199c734cd76)
- chore: release version 0.3.6 [ci skip] [`9a65602`](https://github.com/syncweek-react-aad/react-aad/commit/9a65602c826f815f67315c8e52c7174a87b0928b)
- chore: release version 0.3.3 [skip ci] [`20630d6`](https://github.com/syncweek-react-aad/react-aad/commit/20630d634a50b02e40d342fc6b76caf89fac1f5d)
- chore: release version 0.3.6 [ci skip][`9a65602`](https://github.com/syncweek-react-aad/react-aad/commit/9a65602c826f815f67315c8e52c7174a87b0928b)
- chore: release version 0.3.3 [skip ci][`20630d6`](https://github.com/syncweek-react-aad/react-aad/commit/20630d634a50b02e40d342fc6b76caf89fac1f5d)
- Adding project name to CONTRIBUTING and LICENSE files [`fb0b884`](https://github.com/syncweek-react-aad/react-aad/commit/fb0b88405d9120fdd8fbfcf66efc630e04002fec)
- chore: release version 0.3.5 [skip ci] [`8f84178`](https://github.com/syncweek-react-aad/react-aad/commit/8f84178008bb1d7793b292e0997998b002e4a20f)
- chore: release version 0.3.7 [ci skip] [`751acba`](https://github.com/syncweek-react-aad/react-aad/commit/751acba0f48eb8529efcfca7c6b88c2c098f535c)
- chore: release version 0.3.2 [skip ci] [`9579140`](https://github.com/syncweek-react-aad/react-aad/commit/957914067c2d495dff40f8b713014d958fc0fca5)
- chore: release version 0.3.4 [skip ci] [`6724520`](https://github.com/syncweek-react-aad/react-aad/commit/6724520d8a33d08867670a8e376ff7337e8a5d31)
- chore: release version 0.3.5 [skip ci][`8f84178`](https://github.com/syncweek-react-aad/react-aad/commit/8f84178008bb1d7793b292e0997998b002e4a20f)
- chore: release version 0.3.7 [ci skip][`751acba`](https://github.com/syncweek-react-aad/react-aad/commit/751acba0f48eb8529efcfca7c6b88c2c098f535c)
- chore: release version 0.3.2 [skip ci][`9579140`](https://github.com/syncweek-react-aad/react-aad/commit/957914067c2d495dff40f8b713014d958fc0fca5)
- chore: release version 0.3.4 [skip ci][`6724520`](https://github.com/syncweek-react-aad/react-aad/commit/6724520d8a33d08867670a8e376ff7337e8a5d31)
- Update .travis.yml [`546faa7`](https://github.com/syncweek-react-aad/react-aad/commit/546faa7f3ed7d0f69bbd7c5b228feb598a04e98f)
- Update README.md [`8138405`](https://github.com/syncweek-react-aad/react-aad/commit/81384050766a6379150dbc7adc6f5da35b05ecdd)
- Update .npmignore [`7219d12`](https://github.com/syncweek-react-aad/react-aad/commit/7219d1251c672a7de017bd05295dc57e59c194b9)
Expand Down
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ return (

## Component Properties

| Property | Description |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `provider` | Factory object that provides the configuration values for your Azure Active Directory instance. See [Provider Options](#provider-options) in table below. |
| `authenticatedFunction` | **[Optional]** A user defined callback function for the AzureAD component to consume. This function receives the AzureAD components `logout function` which you can use to trigger a logout. The return value will be rendered by the AzureAD component. If no return value is provided, any elements wrapped by the AzureAD component will be rendered instead. |
| `unauthenticatedFunction` | **[Optional]** A user defined callback function for the AzureAD component to consume. This function receives the AzureAD components `login function` which you can then use to trigger a login. The return value will be rendered by the AzureAD component. |
| `accountInfoCallback` | **[Optional]** A user defined callback function for the AzureAD component to consume. The AzureAD component will call this function when login is complete to pass back the user info in the following format: <br /><br /> `AccountInfo { jwtAccessToken: string, jwtIdToken: string, account: Msal.Account }` <br /> <br /> The format of `Msal.User` [can be found here](https://htmlpreview.github.io/?https://raw.githubusercontent.com/AzureAD/microsoft-authentication-library-for-js/dev/docs/classes/_user_.user.html) |
| `reduxStore` | **[Optional]** You can provide a redux store which the AzureAD component will dispatch `AAD_LOGIN_SUCCESS` and `AAD_LOGIN_SUCCESS` actions, as well as a `payload` containing `IAccountInfo` |
| `forceLogin` | **[Optional]** A boolean that identifies whether the login process should be invoked immediately if the current user is unauthenticated. Defaults to `false`. |
| Property | Description |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `provider` | Factory object that provides the configuration values for your Azure Active Directory instance. See [Provider Options](#provider-options) in table below. |
| `authenticatedFunction` | **[Optional]** A user defined callback function for the AzureAD component to consume. This function receives the AzureAD components `logout function` which you can use to trigger a logout. The return value will be rendered by the AzureAD component. If no return value is provided, any elements wrapped by the AzureAD component will be rendered instead. |
| `unauthenticatedFunction` | **[Optional]** A user defined callback function for the AzureAD component to consume. This function receives the AzureAD components `login function` which you can then use to trigger a login. The return value will be rendered by the AzureAD component. |
| `accountInfoCallback` | **[Optional]** A user defined callback function for the AzureAD component to consume. The AzureAD component will call this function when login is complete to pass back the user info in the following format: <br /><br /> `AccountInfo { jwtAccessToken: string, jwtIdToken: string, account: Msal.Account, authenticationResponse: Msal.AuthResponse }` <br /> <br /> The format of `Msal.Account` [can be found here](https://htmlpreview.github.io/?https://raw.githubusercontent.com/AzureAD/microsoft-authentication-library-for-js/dev/docs/classes/_user_.user.html) |
| `reduxStore` | **[Optional]** You can provide a redux store which the AzureAD component will dispatch `AAD_LOGIN_SUCCESS` and `AAD_LOGIN_SUCCESS` actions, as well as a `payload` containing `IAccountInfo` |
| `forceLogin` | **[Optional]** A boolean that identifies whether the login process should be invoked immediately if the current user is unauthenticated. Defaults to `false`. |

### Provider Options

Expand All @@ -111,8 +111,6 @@ As of right now, there is only a single provider, but more may be added in futur
Below is the total set of configurable options that are supported currently in the `config` object.

```TypeScript
type storage = "localStorage" | "sessionStorage";

// Protocol Support
export type AuthOptions = {
clientId: string;
Expand Down
Loading