Skip to content
This repository was archived by the owner on Feb 23, 2025. It is now read-only.

Commit 645f02b

Browse files
authored
Merge pull request #421 from IdentityModel/joe/par
Add PAR support
2 parents dfb8097 + e948bbe commit 645f02b

19 files changed

+329
-206
lines changed

.gitignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -205,4 +205,8 @@ tools/
205205
.idea
206206

207207
# Visual Studio Code workspace options
208-
.vscode
208+
.vscode/settings.json
209+
210+
# Tokens stored by sample clients
211+
clients/*/proofkey
212+
clients/*/refresh_token

.vscode/launch.json

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "ConsoleClientWithBrowser",
9+
"type": "coreclr",
10+
"request": "launch",
11+
"preLaunchTask": "build-ConsoleClientWithBrowser",
12+
"program": "${workspaceFolder}/clients/ConsoleClientWithBrowser/bin/Debug/net8.0/ConsoleClientWithBrowser.dll",
13+
"args": [],
14+
"cwd": "${workspaceFolder}/clients/ConsoleClientWithBrowser",
15+
"serverReadyAction": {
16+
"action": "openExternally",
17+
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
18+
},
19+
"env": {
20+
"ASPNETCORE_ENVIRONMENT": "Development"
21+
},
22+
"console": "externalTerminal"
23+
},
24+
{
25+
"name": "ConsoleClientWithBrowserAndDPoP",
26+
"type": "coreclr",
27+
"request": "launch",
28+
"preLaunchTask": "build-ConsoleClientWithBrowserAndDPoP",
29+
"program": "${workspaceFolder}/clients/ConsoleClientWithBrowserAndDPoP/bin/Debug/net8.0/ConsoleClientWithBrowserAndDPoP.dll",
30+
"args": [],
31+
"cwd": "${workspaceFolder}/clients/ConsoleClientWithBrowserAndDPoP",
32+
"serverReadyAction": {
33+
"action": "openExternally",
34+
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
35+
},
36+
"env": {
37+
"ASPNETCORE_ENVIRONMENT": "Development"
38+
},
39+
"console": "externalTerminal"
40+
},
41+
{
42+
"name": "ManualModeConsoleClient",
43+
"type": "coreclr",
44+
"request": "launch",
45+
"preLaunchTask": "build-ManualModeConsoleClient",
46+
"program": "${workspaceFolder}/clients/ManualModeConsoleClient/bin/Debug/net8.0-windows/ManualModeConsoleClient.dll",
47+
"args": [],
48+
"cwd": "${workspaceFolder}/clients/ManualModeConsoleClient",
49+
"serverReadyAction": {
50+
"action": "openExternally",
51+
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
52+
},
53+
"env": {
54+
"ASPNETCORE_ENVIRONMENT": "Development"
55+
},
56+
"console": "externalTerminal"
57+
},
58+
]
59+
}

.vscode/tasks.json

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "build-ConsoleClientWithBrowser",
6+
"type": "process",
7+
"command": "dotnet",
8+
"args": [
9+
"build",
10+
"${workspaceFolder}/clients/ConsoleClientWithBrowser/ConsoleClientWithBrowser.csproj",
11+
"/property:GenerateFullPaths=true",
12+
"/consoleloggerparameters:NoSummary"
13+
],
14+
"problemMatcher": "$msCompile"
15+
},
16+
{
17+
"label": "build-ConsoleClientWithBrowserAndDPoP",
18+
"type": "process",
19+
"command": "dotnet",
20+
"args": [
21+
"build",
22+
"${workspaceFolder}/clients/ConsoleClientWithBrowserAndDPoP/ConsoleClientWithBrowserAndDPoP.csproj",
23+
"/property:GenerateFullPaths=true",
24+
"/consoleloggerparameters:NoSummary"
25+
],
26+
"problemMatcher": "$msCompile"
27+
},
28+
{
29+
"label": "build-ManualModeConsoleClient",
30+
"type": "process",
31+
"command": "dotnet",
32+
"args": [
33+
"build",
34+
"${workspaceFolder}/clients/ManualModeConsoleClient/ManualModeConsoleClient.csproj",
35+
"/property:GenerateFullPaths=true",
36+
"/consoleloggerparameters:NoSummary"
37+
],
38+
"problemMatcher": "$msCompile"
39+
}
40+
]
41+
}

IdentityModel.OidcClient.sln

+12
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleClientWithBrowserAnd
2727
EndProject
2828
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TrimmableAnalysis", "test\TrimmableAnalysis\TrimmableAnalysis.csproj", "{672FE4E9-9071-4C59-95FC-F265DF6B2FF5}"
2929
EndProject
30+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ManualModeConsoleClient", "clients\ManualModeConsoleClient\ManualModeConsoleClient.csproj", "{864F9320-43C3-494E-946A-B19B4A7D1CA3}"
31+
EndProject
32+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8EB34682-F5A0-4F91-A624-64F042B5B910}"
33+
ProjectSection(SolutionItems) = preProject
34+
README.md = README.md
35+
EndProjectSection
36+
EndProject
3037
Global
3138
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3239
Debug|Any CPU = Debug|Any CPU
@@ -69,6 +76,10 @@ Global
6976
{672FE4E9-9071-4C59-95FC-F265DF6B2FF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
7077
{672FE4E9-9071-4C59-95FC-F265DF6B2FF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
7178
{672FE4E9-9071-4C59-95FC-F265DF6B2FF5}.Release|Any CPU.Build.0 = Release|Any CPU
79+
{864F9320-43C3-494E-946A-B19B4A7D1CA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
80+
{864F9320-43C3-494E-946A-B19B4A7D1CA3}.Debug|Any CPU.Build.0 = Debug|Any CPU
81+
{864F9320-43C3-494E-946A-B19B4A7D1CA3}.Release|Any CPU.ActiveCfg = Release|Any CPU
82+
{864F9320-43C3-494E-946A-B19B4A7D1CA3}.Release|Any CPU.Build.0 = Release|Any CPU
7283
EndGlobalSection
7384
GlobalSection(SolutionProperties) = preSolution
7485
HideSolutionNode = FALSE
@@ -83,6 +94,7 @@ Global
8394
{0E1807AF-4142-4A3D-925C-BBA019E4E777} = {3DEB81D4-5B40-4D20-AC50-66D1CD6EA24A}
8495
{7DDDA872-49C0-43F0-8B88-2531BF828DDE} = {A4154BEB-4B4A-4A48-B75D-B52432304F36}
8596
{672FE4E9-9071-4C59-95FC-F265DF6B2FF5} = {3DEB81D4-5B40-4D20-AC50-66D1CD6EA24A}
97+
{864F9320-43C3-494E-946A-B19B4A7D1CA3} = {A4154BEB-4B4A-4A48-B75D-B52432304F36}
8698
EndGlobalSection
8799
GlobalSection(ExtensibilityGlobals) = postSolution
88100
SolutionGuid = {66951C2E-691F-408C-9283-F2455F390A9A}

clients/ConsoleClient/ConsoleClient.csproj

-18
This file was deleted.

clients/ConsoleClient/Program.cs

-173
This file was deleted.

clients/ConsoleClientWithBrowser/ConsoleClientWithBrowser.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<OutputType>Exe</OutputType>
66
</PropertyGroup>
77

clients/ConsoleClientWithBrowser/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private static async Task SignIn()
9696

9797
Browser = browser,
9898
IdentityTokenValidator = new JwtHandlerIdentityTokenValidator(),
99-
RefreshTokenInnerHttpHandler = new SocketsHttpHandler()
99+
RefreshTokenInnerHttpHandler = new SocketsHttpHandler(),
100100
};
101101

102102
var serilog = new LoggerConfiguration()

clients/ConsoleClientWithBrowserAndDPoP/ConsoleClientWithBrowserAndDPoP.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<OutputType>Exe</OutputType>
66
</PropertyGroup>
77

clients/ConsoleClientWithBrowserAndDPoP/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private static async Task SignIn()
4747
RedirectUri = redirectUri,
4848
Scope = "openid profile api offline_access",
4949
FilterClaims = false,
50-
Browser = browser,
50+
Browser = browser
5151
};
5252

5353
options.ConfigureDPoP(proofKey);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net8.0-windows</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<ProjectReference Include="..\..\src\OidcClient\OidcClient.csproj" />
12+
</ItemGroup>
13+
14+
</Project>

0 commit comments

Comments
 (0)