Skip to content

Commit

Permalink
Merge pull request #421 from IdentityModel/joe/par
Browse files Browse the repository at this point in the history
Add PAR support
  • Loading branch information
brockallen authored Apr 5, 2024
2 parents dfb8097 + e948bbe commit 645f02b
Show file tree
Hide file tree
Showing 19 changed files with 329 additions and 206 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -205,4 +205,8 @@ tools/
.idea

# Visual Studio Code workspace options
.vscode
.vscode/settings.json

# Tokens stored by sample clients
clients/*/proofkey
clients/*/refresh_token
59 changes: 59 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "ConsoleClientWithBrowser",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-ConsoleClientWithBrowser",
"program": "${workspaceFolder}/clients/ConsoleClientWithBrowser/bin/Debug/net8.0/ConsoleClientWithBrowser.dll",
"args": [],
"cwd": "${workspaceFolder}/clients/ConsoleClientWithBrowser",
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"console": "externalTerminal"
},
{
"name": "ConsoleClientWithBrowserAndDPoP",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-ConsoleClientWithBrowserAndDPoP",
"program": "${workspaceFolder}/clients/ConsoleClientWithBrowserAndDPoP/bin/Debug/net8.0/ConsoleClientWithBrowserAndDPoP.dll",
"args": [],
"cwd": "${workspaceFolder}/clients/ConsoleClientWithBrowserAndDPoP",
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"console": "externalTerminal"
},
{
"name": "ManualModeConsoleClient",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-ManualModeConsoleClient",
"program": "${workspaceFolder}/clients/ManualModeConsoleClient/bin/Debug/net8.0-windows/ManualModeConsoleClient.dll",
"args": [],
"cwd": "${workspaceFolder}/clients/ManualModeConsoleClient",
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"console": "externalTerminal"
},
]
}
41 changes: 41 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build-ConsoleClientWithBrowser",
"type": "process",
"command": "dotnet",
"args": [
"build",
"${workspaceFolder}/clients/ConsoleClientWithBrowser/ConsoleClientWithBrowser.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "build-ConsoleClientWithBrowserAndDPoP",
"type": "process",
"command": "dotnet",
"args": [
"build",
"${workspaceFolder}/clients/ConsoleClientWithBrowserAndDPoP/ConsoleClientWithBrowserAndDPoP.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "build-ManualModeConsoleClient",
"type": "process",
"command": "dotnet",
"args": [
"build",
"${workspaceFolder}/clients/ManualModeConsoleClient/ManualModeConsoleClient.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}
12 changes: 12 additions & 0 deletions IdentityModel.OidcClient.sln
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleClientWithBrowserAnd
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TrimmableAnalysis", "test\TrimmableAnalysis\TrimmableAnalysis.csproj", "{672FE4E9-9071-4C59-95FC-F265DF6B2FF5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ManualModeConsoleClient", "clients\ManualModeConsoleClient\ManualModeConsoleClient.csproj", "{864F9320-43C3-494E-946A-B19B4A7D1CA3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8EB34682-F5A0-4F91-A624-64F042B5B910}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -69,6 +76,10 @@ Global
{672FE4E9-9071-4C59-95FC-F265DF6B2FF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{672FE4E9-9071-4C59-95FC-F265DF6B2FF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{672FE4E9-9071-4C59-95FC-F265DF6B2FF5}.Release|Any CPU.Build.0 = Release|Any CPU
{864F9320-43C3-494E-946A-B19B4A7D1CA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{864F9320-43C3-494E-946A-B19B4A7D1CA3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{864F9320-43C3-494E-946A-B19B4A7D1CA3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{864F9320-43C3-494E-946A-B19B4A7D1CA3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -83,6 +94,7 @@ Global
{0E1807AF-4142-4A3D-925C-BBA019E4E777} = {3DEB81D4-5B40-4D20-AC50-66D1CD6EA24A}
{7DDDA872-49C0-43F0-8B88-2531BF828DDE} = {A4154BEB-4B4A-4A48-B75D-B52432304F36}
{672FE4E9-9071-4C59-95FC-F265DF6B2FF5} = {3DEB81D4-5B40-4D20-AC50-66D1CD6EA24A}
{864F9320-43C3-494E-946A-B19B4A7D1CA3} = {A4154BEB-4B4A-4A48-B75D-B52432304F36}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {66951C2E-691F-408C-9283-F2455F390A9A}
Expand Down
18 changes: 0 additions & 18 deletions clients/ConsoleClient/ConsoleClient.csproj

This file was deleted.

173 changes: 0 additions & 173 deletions clients/ConsoleClient/Program.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion clients/ConsoleClientWithBrowser/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private static async Task SignIn()

Browser = browser,
IdentityTokenValidator = new JwtHandlerIdentityTokenValidator(),
RefreshTokenInnerHttpHandler = new SocketsHttpHandler()
RefreshTokenInnerHttpHandler = new SocketsHttpHandler(),
};

var serilog = new LoggerConfiguration()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion clients/ConsoleClientWithBrowserAndDPoP/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private static async Task SignIn()
RedirectUri = redirectUri,
Scope = "openid profile api offline_access",
FilterClaims = false,
Browser = browser,
Browser = browser
};

options.ConfigureDPoP(proofKey);
Expand Down
14 changes: 14 additions & 0 deletions clients/ManualModeConsoleClient/ManualModeConsoleClient.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\OidcClient\OidcClient.csproj" />
</ItemGroup>

</Project>
Loading

0 comments on commit 645f02b

Please sign in to comment.