Skip to content

Commit fc5d24a

Browse files
jmprieurjennyf19
andauthored
Improve the Ciam sample (#2703)
Co-authored-by: jennyf19 <[email protected]>
1 parent b510002 commit fc5d24a

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

tests/DevApps/ciam/myWebApi/appsettings.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
"AzureAd": {
33
"ClientId": "63e6d091-0e6d-4c8b-be67-d405e02ae3d8",
44
"Scopes": "access_as_user",
5-
"CallbackPath": "/signin-oidc",
65
"Authority": "https://TrialTenantJmprieur.ciamlogin.com/"
76
},
87
"Logging": {
98
"LogLevel": {
10-
"Default": "Information",
9+
"Default": "Information",
1110
"Microsoft.AspNetCore": "Warning"
1211
}
1312
},
1413
"AllowedHosts": "*"
15-
}
14+
}

tests/DevApps/ciam/myWebApp/Pages/Index.cshtml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public async Task OnGet()
3131
else
3232
{
3333
var error = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
34-
throw new HttpRequestException($"Invalid status code in the HttpResponseMessage: {response.StatusCode}: {error}");
34+
ViewData["ApiResult"] = $"Invalid status code in the HttpResponseMessage: {response.StatusCode}: {error}";
3535
}
3636
}
3737
}

tests/DevApps/ciam/myWebApp/appsettings.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@
55
"ClientCertificates": [],
66
"CallbackPath": "/signin-oidc",
77
"Authority": "https://TrialTenantJmprieur.ciamlogin.com/",
8+
"Prompt": "login"
89
},
910
"DownstreamApi": {
1011
"BaseUrl": "https://localhost:7082/weatherforecast",
11-
"Scopes": "api://63e6d091-0e6d-4c8b-be67-d405e02ae3d8/access_as_user"
12+
"Scopes": [ "api://63e6d091-0e6d-4c8b-be67-d405e02ae3d8/.default" ]
1213
},
1314
"Logging": {
1415
"LogLevel": {
15-
"Default": "Information",
16-
"Microsoft.AspNetCore": "Warning"
16+
"Default": "Information",
17+
"Microsoft.AspNetCore": "Warning",
18+
"Microsoft.Identity": "Information"
1719
}
1820
},
1921
"AllowedHosts": "*"

0 commit comments

Comments
 (0)