You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 25, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Contributing to msal-express-wrapper
1
+
# Contributing to microsoft-identity-express
2
2
3
3
This project welcomes contributions and suggestions. Most contributions require you to agree to a
4
4
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
@@ -51,12 +51,12 @@ chances of your issue being dealt with quickly:
51
51
***Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
52
52
causing the problem (line of code or commit)
53
53
54
-
You can file new issues by providing the above information at the corresponding repository's issues link: https://github.com/Azure-Samples/msal-express-wrapper/issues/new.
54
+
You can file new issues by providing the above information at the corresponding repository's issues link: https://github.com/Azure-Samples/microsoft-identity-express/issues/new.
55
55
56
56
### <aname="submit-pr"></a> Submitting a Pull Request (PR)
57
57
Before you submit your Pull Request (PR) consider the following guidelines:
58
58
59
-
* Search the repository (https://github.com/Azure-Samples/msal-express-wrapper/pulls) for an open or closed PR
59
+
* Search the repository (https://github.com/Azure-Samples/microsoft-identity-express/pulls) for an open or closed PR
60
60
that relates to your submission. You don't want to duplicate effort.
Copy file name to clipboardExpand all lines: README.md
+21-22Lines changed: 21 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
8
8
---
9
9
10
-
This project illustrates a simple wrapper around the [ConfidentialClientApplication](https://azuread.github.io/microsoft-authentication-library-for-js/ref/classes/_azure_msal_node.confidentialclientapplication.html) class of the [Microsoft Authentication Library for Node.js](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-node#microsoft-authentication-library-for-node-msal-node) (MSAL Node), in order to streamline routine authentication tasks such as login, logout and token acquisition, as well as securing routes and controlling access.
10
+
This project illustrates a simple wrapper around the [ConfidentialClientApplication](https://azuread.github.io/microsoft-authentication-library-for-js/ref/classes/_azure_msal_node.confidentialclientapplication.html) class of the [Microsoft Authentication Library for Node.js](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-node#microsoft-authentication-library-for-node-msal-node) (MSAL Node), in order to streamline routine authentication tasks such as login, logout and token acquisition, as well as securing routes and controlling access. In doing so it takes inspiration from the [Microsoft.Identity.Web](https://github.com/AzureAD/microsoft-identity-web) with respect to developer experience.
11
11
12
12
This is an open source project. [Suggestions](https://github.com/Azure-Samples/msal-express-wrapper/issues/new) and [contributions](https://github.com/Azure-Samples/msal-express-wrapper/blob/dev/CONTRIBUTING.md) are welcome!
13
13
@@ -65,17 +65,18 @@ const appSettings = {
65
65
clientSecret:"CLIENT_SECRET"// alt. client certificate or key vault credential
66
66
},
67
67
authRoutes: {
68
-
redirect:"/redirect", // redirect URI configured on Azure AD
68
+
redirect:"/redirect", // redirect path or the full URI configured on Azure AD
69
69
error:"/error", // errors will be redirected to this route
70
70
unauthorized:"/unauthorized"// unauthorized access attempts will be redirected to this route
71
+
frontChannelLogout:"/sso_logout"// front-channel logout path or the full URI configured on Azure AD
71
72
},
72
73
remoteResources: {
73
74
graphAPI: {
74
-
endpoint:"https://graph.microsoft.com/v1.0/me", // Microsoft Graph
75
+
endpoint:"https://graph.microsoft.com/v1.0/me", // Microsoft Graph API
75
76
scopes: ["user.read"]
76
77
},
77
78
armAPI: {
78
-
endpoint:"https://management.azure.com/tenants?api-version=2020-01-01", // Azure REST API
79
+
endpoint:"https://management.azure.com/tenants?api-version=2020-01-01", // Azure Resource Manager REST API
app.use(router(authProvider)); // use authProvider in routers downstream
129
+
app.use(router(msid)); // use authProvider in routers downstream
129
130
130
131
app.listen(SERVER_PORT, () =>console.log(`Server is listening on port ${SERVER_PORT}!`));
131
132
```
@@ -134,7 +135,7 @@ The wrapper stores user data on `req.session` variable. Below are some of the us
134
135
135
136
*`req.session.isAuthenticated`: indicates if user is currently authenticated (*boolean*)
136
137
*`req.session.account`: MSAL.js account object containing useful information like ID token claims (see [AccountInfo](https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#accountinfo))
137
-
*`req.session.remoteResources.{resourceName}`: Contains parameters related to an Azure AD / Azure AD B2C protected resource, including raw access tokens (see [Resource](https://azure-samples.github.io/msal-express-wrapper/docs/modules.html#resource))
138
+
*`req.session.protectedResources.<resourceName>`: Contains parameters related to an Azure AD / Azure AD B2C protected resource, including raw access tokens (see [Resource](https://azure-samples.github.io/msal-express-wrapper/docs/modules.html#resource))
Copy file name to clipboardExpand all lines: demo/README.md
+3-7Lines changed: 3 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,6 @@ This sample demonstrates a Node.js & Express web application that authenticates
15
15
|`App/app.js`| Application entry point. |
16
16
|`App/appSettings.json`| Application settings and authentication parameters. |
17
17
|`App/routes/router.js`| Application routes are defined here. |
18
-
|`App/utils/cachePlugin.js`| Example cache plugin implementation for saving cache to disk. |
19
18
20
19
## Prerequisites
21
20
@@ -71,12 +70,9 @@ Open the project in your IDE (like Visual Studio or Visual Studio Code) to confi
71
70
> In the steps below, "ClientID" is the same as "Application ID" or "AppId".
72
71
73
72
1. Open the `./App/appSettings.json` file.
74
-
1. Find the key `clientId` and replace the existing value with the **application ID** (clientId) of the `ExpressWebApp` application copied from the Azure Portal.
75
-
1. Find the key `tenantId` and replace the existing value with your Azure AD **tenant ID**.
76
-
1. Find the key `clientSecret` and replace the existing value with the key you saved during the creation of the `ExpressWebApp` app, in the Azure Portal.
77
-
1. Find the key `homePageRoute` and replace the existing value with the route that you wish to be redirected after sign-in, e.g. `/home`.
78
-
1. Find the key `redirectUri` and replace the existing value with the **Redirect URI** for `ExpressWebApp` app. For example, `http://localhost:4000/redirect`.
79
-
1. Find the `postLogoutRedirectUri` and replace the existing value with the URI that you wish to be redirected after sign-out, e.g. `http://localhost:4000/`
73
+
1. Find the key `appCredentials.clientId` and replace the existing value with the **application ID** (clientId) of the `ExpressWebApp` application copied from the Azure Portal.
74
+
1. Find the key `appCredentials.tenantInfo` and replace the existing value with your Azure AD **tenant ID** (alternatively, `common` for all audiences).
75
+
1. Find the key `authRoutes.redirect` and replace the existing value with the **Redirect URI** for `ExpressWebApp` app. For example, `http://localhost:4000/redirect` or simply `/redirect`.
0 commit comments