File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
articles/active-directory/develop Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -225,14 +225,10 @@ else
225
225
```javascript
226
226
const checkForRequiredAuthContext = (req , res , next , authContextId ) => {
227
227
// req.authInfo contains the decoded access token payload
228
- if (! req .authInfo ['acrs' ] || ! req .authInfo ['acrs' ].includes (authContextId )) {
229
- if (isClientCapableOfClaimsChallenge (req .authInfo )) {
228
+ if (isClientCapableOfClaimsChallenge (req .authInfo )) {
230
229
// Return formatted claims challenge as this client understands this
231
- } else {
232
- return res .status (403 ).json ({ error : 'Client is not capable' });
233
- }
234
230
} else {
235
- next ( );
231
+ return res . status ( 403 ). json ({ error : 'Client is not capable' } );
236
232
}
237
233
}
238
234
@@ -252,3 +248,5 @@ const isClientCapableOfClaimsChallenge = (accessTokenClaims) => {
252
248
- [Microsoft identity platform and OAuth 2 . 0 authorization code flow ](v2 - oauth2 - auth - code - flow .md #request - an - authorization - code )
253
249
- [How to use Continuous Access Evaluation enabled APIs in your applications ](app - resilience - continuous - access - evaluation .md )
254
250
- [Granular Conditional Access for sensitive data and actions ](https :// techcommunity.microsoft.com/t5/azure-active-directory-identity/granular-conditional-access-for-sensitive-data-and-actions/ba-p/1751775)
251
+ - [React single - page application using MSAL React to sign - in users against Azure Active Directory ](https :// github.com/Azure-Samples/ms-identity-javascript-react-tutorial/tree/main/2-Authorization-I/1-call-graph)
252
+ - [Enable your ASP .NET Core web app to sign in users and call Microsoft Graph with the Microsoft identity platform ](https :// github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/tree/master/2-WebApp-graph-user/2-1-Call-MSGraph)
You can’t perform that action at this time.
0 commit comments