File tree Expand file tree Collapse file tree
BlazorAutoRendering/BlazorAutoRendering
JsBffYarpSample/FrontendHost
Quickstarts/BlazorBffApp/BlazorBffApp Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616 . AddInteractiveServerComponents ( )
1717 . AddInteractiveWebAssemblyComponents ( ) ;
1818
19- builder . Services . AddAuthentication ( options =>
20- {
21- options . DefaultScheme = BffAuthenticationSchemes . BffCookie ;
22- options . DefaultChallengeScheme = BffAuthenticationSchemes . BffOpenIdConnect ;
23- } ) ;
24-
2519// BFF setup for blazor
2620builder . Services . AddBff ( )
2721 . AddServerSideSessions ( ) // Add in-memory implementation of server side sessions
Original file line number Diff line number Diff line change 4242 options . Cookie . SameSite = SameSiteMode . Strict ;
4343 } ) ;
4444
45- var yarpBuilder = builder . Services . AddReverseProxy ( ) ;
45+ var yarpBuilder = builder . Services . AddReverseProxy ( ) . AddBffExtensions ( ) ;
4646//Configure from included extension method
4747yarpBuilder . Configure ( ) ;
4848
Original file line number Diff line number Diff line change 5252
5353//builder.Services.AddHttpClient<WeatherHttpClient>(opt => opt.BaseAddress = new Uri("https://localhost:7007"));
5454
55- // Configure the authentication
56- builder . Services . AddAuthentication ( options =>
57- {
58- options . DefaultScheme = BffAuthenticationSchemes . BffCookie ;
59- options . DefaultChallengeScheme = BffAuthenticationSchemes . BffOpenIdConnect ;
60- options . DefaultSignOutScheme = BffAuthenticationSchemes . BffOpenIdConnect ;
61- } ) ;
62-
6355// Make sure authentication state is available to all components.
6456builder . Services . AddCascadingAuthenticationState ( ) ;
6557
Original file line number Diff line number Diff line change 4141 options . Cookie . SameSite = SameSiteMode . Strict ;
4242 } ) ;
4343
44- builder . Services . AddAuthentication ( options =>
45- {
46- options . DefaultScheme = BffAuthenticationSchemes . BffCookie ;
47- options . DefaultChallengeScheme = BffAuthenticationSchemes . BffOpenIdConnect ;
48- options . DefaultSignOutScheme = BffAuthenticationSchemes . BffOpenIdConnect ;
49- } ) ;
50-
5144builder . Services . AddAuthorization ( ) ;
5245
5346var app = builder . Build ( ) ;
Original file line number Diff line number Diff line change 6363 client . BaseAddress = new Uri ( "https://localhost:5002/" ) ;
6464} ) ;
6565
66- builder . Services . AddAuthentication ( options =>
67- {
68- options . DefaultScheme = BffAuthenticationSchemes . BffCookie ;
69- options . DefaultChallengeScheme = BffAuthenticationSchemes . BffOpenIdConnect ;
70- options . DefaultSignOutScheme = BffAuthenticationSchemes . BffOpenIdConnect ;
71- } ) ;
72-
7366var app = builder . Build ( ) ;
7467
7568app . UseDefaultFiles ( ) ;
Original file line number Diff line number Diff line change 3737 options . Cookie . SameSite = SameSiteMode . Strict ;
3838 } ) ;
3939
40- builder . Services . AddAuthentication ( options =>
41- {
42- options . DefaultScheme = BffAuthenticationSchemes . BffCookie ;
43- options . DefaultChallengeScheme = BffAuthenticationSchemes . BffOpenIdConnect ;
44- options . DefaultSignOutScheme = BffAuthenticationSchemes . BffOpenIdConnect ;
45- } ) ;
46-
4740builder . Services . AddAuthorization ( ) ;
4841
4942var app = builder . Build ( ) ;
Original file line number Diff line number Diff line change 7575 options . Cookie . SameSite = SameSiteMode . Strict ;
7676 } ) ;
7777
78- builder . Services . AddAuthentication ( options =>
79- {
80- options . DefaultScheme = BffAuthenticationSchemes . BffCookie ;
81- options . DefaultChallengeScheme = BffAuthenticationSchemes . BffOpenIdConnect ;
82- options . DefaultSignOutScheme = BffAuthenticationSchemes . BffOpenIdConnect ;
83- } ) ;
84-
8578builder . Services . AddUserAccessTokenHttpClient ( "api_client" , configureClient : client =>
8679{
8780 client . BaseAddress = new Uri ( "https://localhost:5002/" ) ;
You can’t perform that action at this time.
0 commit comments