File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
2-WebApp-graph-user/2-6-BFF-Proxy/CallGraphBFF
4-WebApp-your-API/4-1-MyOrg/Client/Controllers Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change 15
15
16
16
// Add Microsoft.Identity.Web services to the container.
17
17
builder . Services . AddMicrosoftIdentityWebAppAuthentication ( builder . Configuration )
18
- . EnableTokenAcquisitionToCallDownstreamApi ( builder . Configuration . GetSection ( "DownstreamApi:Scopes" ) . Value . Split ( ' ' ) )
19
- . AddMicrosoftGraph ( builder . Configuration . GetValue < string > ( "DownstreamApi:BaseUrl" ) , builder . Configuration . GetValue < string > ( "DownstreamApi:Scopes" ) )
18
+ . EnableTokenAcquisitionToCallDownstreamApi ( builder . Configuration . GetSection ( "DownstreamApi:Scopes" ) . Value ! . Split ( ' ' ) )
19
+ . AddMicrosoftGraph ( builder . Configuration . GetValue < string > ( "DownstreamApi:BaseUrl" ) ! , builder . Configuration . GetValue < string > ( "DownstreamApi:Scopes" ) ! )
20
20
. AddInMemoryTokenCaches ( ) ;
21
21
22
22
// Add session for sharing non-sensitive strings between routes.
Original file line number Diff line number Diff line change 9
9
10
10
namespace TodoListClient . Controllers
11
11
{
12
- // TODO: Change the "c53a1bc4-9757-407d-a76a-51a2032d2afb" GUID
13
- // by the Application ID of the web API
14
- [ AuthorizeForScopes ( Scopes = new string [ ] {
15
- "api://c53a1bc4-9757-407d-a76a-51a2032d2afb/ToDoList.Read" ,
16
- "api://c53a1bc4-9757-407d-a76a-51a2032d2afb/ToDoList.ReadWrite" } ) ]
12
+ [ AuthorizeForScopes ( ScopeKeySection = "TodoList:Scopes" ) ]
17
13
public class TodoListController : Controller
18
14
{
19
15
private IDownstreamApi _downstreamApi ;
You can’t perform that action at this time.
0 commit comments