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
Copy file name to clipboardExpand all lines: 3-Authorization-II/2-call-api-b2c/README.md
+15-66Lines changed: 15 additions & 66 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -262,78 +262,27 @@ For validation and debugging purposes, developers can decode **JWT**s (*JSON Web
262
262
263
263
### Verifying permissions
264
264
265
-
Access tokens that have neither the **scp** (for delegated permissions) nor **roles** (for application permissions) claim with the required scopes/permissions should not be accepted. In the sample, this is illustrated via the `RequiredScopeOrAppPermission` attribute in [TodoListController.cs](./API/TodoListAPI/Controllers/TodoListController.cs):
266
-
267
-
```csharp
268
-
[HttpGet]
269
-
/// <summary>
270
-
/// An access token issued by Azure AD will have at least one of the two claims. Access tokens
271
-
/// issued to a user will have the 'scp' claim. Access tokens issued to an application will have
272
-
/// the roles claim. Access tokens that contain both claims are issued only to users, where the scp
273
-
/// claim designates the delegated permissions, while the roles claim designates the user's role.
Web API endpoints should be prepared to accept calls from both users and applications, and should have control structures in place to respond to each accordingly. For instance, a call from a user via delegated permissions should be responded with user's data, while a call from an application via application permissions might be responded with the entire todolist. This is illustrated in the [TodoListController](./API/TodoListAPI/Controllers/TodoListController.cs) controller:
265
+
Access tokens that does not have the **scp** (for delegated permissions) claim with the required scopes/permissions should not be accepted. In the sample, this is illustrated via the `RequiredScope` attribute in [TodoListController.cs](./API/TodoListAPI/Controllers/TodoListController.cs):
0 commit comments