Skip to content

Commit

Permalink
Improve the Ciam sample (#2703)
Browse files Browse the repository at this point in the history
Co-authored-by: jennyf19 <[email protected]>
  • Loading branch information
jmprieur and jennyf19 authored Mar 14, 2024
1 parent b510002 commit fc5d24a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 2 additions & 3 deletions tests/DevApps/ciam/myWebApi/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
"AzureAd": {
"ClientId": "63e6d091-0e6d-4c8b-be67-d405e02ae3d8",
"Scopes": "access_as_user",
"CallbackPath": "/signin-oidc",
"Authority": "https://TrialTenantJmprieur.ciamlogin.com/"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}
}
2 changes: 1 addition & 1 deletion tests/DevApps/ciam/myWebApp/Pages/Index.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public async Task OnGet()
else
{
var error = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new HttpRequestException($"Invalid status code in the HttpResponseMessage: {response.StatusCode}: {error}");
ViewData["ApiResult"] = $"Invalid status code in the HttpResponseMessage: {response.StatusCode}: {error}";
}
}
}
8 changes: 5 additions & 3 deletions tests/DevApps/ciam/myWebApp/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
"ClientCertificates": [],
"CallbackPath": "/signin-oidc",
"Authority": "https://TrialTenantJmprieur.ciamlogin.com/",
"Prompt": "login"
},
"DownstreamApi": {
"BaseUrl": "https://localhost:7082/weatherforecast",
"Scopes": "api://63e6d091-0e6d-4c8b-be67-d405e02ae3d8/access_as_user"
"Scopes": [ "api://63e6d091-0e6d-4c8b-be67-d405e02ae3d8/.default" ]
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Microsoft.Identity": "Information"
}
},
"AllowedHosts": "*"
Expand Down

0 comments on commit fc5d24a

Please sign in to comment.