File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
2. Web API now calls Microsoft Graph/TodoListService/Controllers Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -39,13 +39,13 @@ public TodoListController(ITokenAcquisition tokenAcquisition)
3939 /// /// The Web API will only accept tokens 1) for users, and
4040 /// 2) having the access_as_user scope for this API
4141 /// </summary>
42- static readonly string [ ] scopeRequiredByAPI = new string [ ] { "access_as_user" } ;
42+ static readonly string [ ] scopeRequiredByApi = new string [ ] { "access_as_user" } ;
4343
4444 // GET: api/values
4545 [ HttpGet ]
4646 public IEnumerable < TodoItem > Get ( )
4747 {
48- HttpContext . VerifyUserHasAnyAcceptedScope ( scopeRequiredByAPI ) ;
48+ HttpContext . VerifyUserHasAnyAcceptedScope ( scopeRequiredByApi ) ;
4949 string owner = User . FindFirst ( ClaimTypes . NameIdentifier ) ? . Value ;
5050 return TodoStore . Where ( t => t . Owner == owner ) . ToList ( ) ;
5151 }
@@ -54,7 +54,7 @@ public IEnumerable<TodoItem> Get()
5454 [ HttpPost ]
5555 public async void Post ( [ FromBody ] TodoItem todo )
5656 {
57- HttpContext . VerifyUserHasAnyAcceptedScope ( scopeRequiredByAPI ) ;
57+ HttpContext . VerifyUserHasAnyAcceptedScope ( scopeRequiredByApi ) ;
5858 string owner = User . FindFirst ( ClaimTypes . NameIdentifier ) ? . Value ;
5959 string ownerName ;
6060#if ENABLE_OBO
You can’t perform that action at this time.
0 commit comments