Skip to content

Commit 681dab8

Browse files
committed
small corrections for solution 3
1 parent af802b8 commit 681dab8

File tree

13 files changed

+64
-4
lines changed

13 files changed

+64
-4
lines changed

.vscode/launch.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
// Use IntelliSense to find out which attributes exist for C# debugging
3+
// Use hover for the description of the existing attributes
4+
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": ".NET Core Launch (web)",
9+
"type": "coreclr",
10+
"request": "launch",
11+
"preLaunchTask": "build",
12+
// If you have changed target frameworks, make sure to update the program path.
13+
"program": "${workspaceFolder}/Solution 1 - Setup OIDC system with client credentials/AuthorizationServer/bin/Debug/netcoreapp2.0/AuthorizationServer.dll",
14+
"args": [],
15+
"cwd": "${workspaceFolder}/Solution 1 - Setup OIDC system with client credentials/AuthorizationServer",
16+
"stopAtEntry": false,
17+
"internalConsoleOptions": "openOnSessionStart",
18+
"launchBrowser": {
19+
"enabled": true,
20+
"args": "${auto-detect-url}",
21+
"windows": {
22+
"command": "cmd.exe",
23+
"args": "/C start ${auto-detect-url}"
24+
},
25+
"osx": {
26+
"command": "open"
27+
},
28+
"linux": {
29+
"command": "xdg-open"
30+
}
31+
},
32+
"env": {
33+
"ASPNETCORE_ENVIRONMENT": "Development"
34+
},
35+
"sourceFileMap": {
36+
"/Views": "${workspaceFolder}/Views"
37+
}
38+
},
39+
{
40+
"name": ".NET Core Attach",
41+
"type": "coreclr",
42+
"request": "attach",
43+
"processId": "${command:pickProcess}"
44+
}
45+
,]
46+
}

.vscode/tasks.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "build",
6+
"command": "dotnet",
7+
"type": "process",
8+
"args": [
9+
"build",
10+
"${workspaceFolder}/Solution 1 - Setup OIDC system with client credentials/AuthorizationServer/AuthorizationServer.csproj"
11+
],
12+
"problemMatcher": "$msCompile"
13+
}
14+
]
15+
}

Solution 3 - OIDC with Hybrid flow and call api/AuthorizationServer/Config.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static IEnumerable<Client> GetClients()
4848
AllowedScopes = { "resourceApi" }
4949
},
5050

51-
// OpenID Connect implicit flow client (MVC)
51+
// OpenID Connect hybrid flow client (MVC)
5252
new Client
5353
{
5454
ClientId = "mvc",

Solution 3 - OIDC with Hybrid flow and call api/ClientApp/Controllers/IdentityController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ private async Task<HttpResponseMessage> GetUserClaimsFromApiWithClientCredential
5757
return response;
5858
}
5959

60-
public async Task<HttpResponseMessage> CallApiUsingUserAccessToken()
60+
private async Task<HttpResponseMessage> CallApiUsingUserAccessToken()
6161
{
6262
var accessToken = await HttpContext.GetTokenAsync("access_token");
6363

Solution 3 - OIDC with Hybrid flow and call api/ClientApp/Startup.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public void ConfigureServices(IServiceCollection services)
4343
// Request these scopes
4444
options.Scope.Add("resourceApi");
4545
options.Scope.Add("offline_access");
46-
4746
});
4847

4948
services.AddMvc();

Solution 3 - OIDC with Hybrid flow and call api/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ Authorization Server:
77

88
Client server:
99
1) Setup OIDC middleware with ClientSecret, Scope and response type "code ID_TOKEN" for providing both the authorization code and ID token on first roundtrip.
10-
2) Setup IdentityServer with method for calling api with obtained access token (obtained trough the hybrid flow client) and one for invoke with token from client credentials authentication
10+
2) Setup IdentityServer with method for calling api with access token (obtained trough the hybrid flow client) and one for invoke with token from client credentials authentication

0 commit comments

Comments
 (0)