Skip to content

Commit

Permalink
Fixed settings
Browse files Browse the repository at this point in the history
  • Loading branch information
gary-archer committed Apr 21, 2021
1 parent b3fa2e9 commit 5a56da8
Show file tree
Hide file tree
Showing 12 changed files with 1,116 additions and 21 deletions.
13 changes: 13 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"ExpandedNodes": [
"",
"\\example-dotnet-openid-connect-client",
"\\example-dotnet-openid-connect-client\\App_Start",
"\\example-dotnet-openid-connect-client\\Content",
"\\example-dotnet-openid-connect-client\\Controllers",
"\\example-dotnet-openid-connect-client\\Helpers",
"\\example-dotnet-openid-connect-client\\Views"
],
"SelectedNode": "\\example-dotnet-openid-connect-client",
"PreviewInSolutionExplorer": false
}
1,031 changes: 1,031 additions & 0 deletions .vs/example-dotnet-openid-connect-client/config/applicationhost.config

Large diffs are not rendered by default.

Binary file added .vs/slnx.sqlite
Binary file not shown.
17 changes: 17 additions & 0 deletions Backup/example-dotnet-openid-connect-client.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "example-dotnet-openid-connect-client", "example-dotnet-openid-connect-client\example-dotnet-openid-connect-client.csproj", "{EE8C3DEC-F0F2-4AE4-81A0-58359117602E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{EE8C3DEC-F0F2-4AE4-81A0-58359117602E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EE8C3DEC-F0F2-4AE4-81A0-58359117602E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE8C3DEC-F0F2-4AE4-81A0-58359117602E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EE8C3DEC-F0F2-4AE4-81A0-58359117602E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
Binary file added UpgradeLog.htm
Binary file not shown.
11 changes: 9 additions & 2 deletions example-dotnet-openid-connect-client.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
# Visual Studio Version 16
VisualStudioVersion = 16.0.31205.134
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "example-dotnet-openid-connect-client", "example-dotnet-openid-connect-client\example-dotnet-openid-connect-client.csproj", "{EE8C3DEC-F0F2-4AE4-81A0-58359117602E}"
EndProject
Global
Expand All @@ -14,4 +15,10 @@ Global
{EE8C3DEC-F0F2-4AE4-81A0-58359117602E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EE8C3DEC-F0F2-4AE4-81A0-58359117602E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8166D316-2134-441E-B026-08A4A6DA31C2}
EndGlobalSection
EndGlobal
6 changes: 5 additions & 1 deletion example-dotnet-openid-connect-client/App_Start/AppConfig.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Configuration;
using System.Net;
using System.Net.Http;
using Newtonsoft.Json.Linq;

Expand All @@ -25,6 +26,8 @@ public class AppConfig

private AppConfig()
{
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

client_id = ConfigurationManager.AppSettings["client_id"];
client_secret = ConfigurationManager.AppSettings["client_secret"];
redirect_uri = ConfigurationManager.AppSettings["redirect_uri"];
Expand All @@ -42,7 +45,6 @@ private AppConfig()
{
var discoveryClient = new HttpClient();


var response = discoveryClient.GetAsync(issuer + "/.well-known/openid-configuration").Result;
if (response.IsSuccessStatusCode)
{
Expand All @@ -58,6 +60,8 @@ private AppConfig()
}
}



public String GetLogoutEndpoint()
{
return logout_endpoint;
Expand Down
31 changes: 15 additions & 16 deletions example-dotnet-openid-connect-client/Web.config
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="client_id" value="client-dotnet" />
<add key="client_secret" value="Password1" />
<add key="redirect_uri" value="http:https://localhost:5443/callback" />
<add key="scope" value="openid read" />
<add key="authorization_endpoint" value="" />
<add key="token_endpoint" value="" />
<add key="logout_endpoint" value="https://nordicapis.curity.io/authn/authenticate/logout?redirect_uri=http:https://localhost:5443" />
<add key="revocation_endpoint" value="" />
<add key="jwks_uri" value="" />
<add key="issuer" value="https://nordicapis.curity.io/~" />
<add key="api_endpoint" value="https://nordicapis-api.curity.io/hello_world" />
<add key="base_url" value="http:https://localhost:5443" />
<add key="client_id" value="client-dotnet"/>
<add key="client_secret" value="Password1"/>
<add key="redirect_uri" value="http:https://localhost:5443/callback"/>
<add key="scope" value="openid read"/>
<add key="authorization_endpoint" value=""/>
<add key="token_endpoint" value=""/>
<add key="logout_endpoint" value="https://login.curitydemo.com/authn/authenticate/logout?redirect_uri=http:https://localhost:5443"/>
<add key="revocation_endpoint" value=""/>
<add key="jwks_uri" value=""/>
<add key="issuer" value="https://login.curitydemo.com/oauth/v2/oauth-anonymous"/>
<add key="api_endpoint" value="https://localhost:3000"/>
<add key="base_url" value="http:https://localhost:5443"/>
</appSettings>
<system.web>
<compilation>
<assemblies>
</assemblies>
<compilation debug="true">
<assemblies/>
</compilation>
</system.web>
</configuration>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http:https://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand All @@ -9,6 +9,13 @@
<RootNamespace>exampledotnetopenidconnectclient</RootNamespace>
<AssemblyName>example-dotnet-openid-connect-client</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -90,7 +97,6 @@
<Folder Include="Content\" />
<Folder Include="Models\" />
<Folder Include="Scripts\" />
<Folder Include="Helpers\" />
</ItemGroup>
<ItemGroup>
<Compile Include="Controllers\HomeController.cs" />
Expand Down Expand Up @@ -126,5 +132,23 @@
</Policies>
</Properties>
</MonoDevelop>
<VisualStudio>
<FlavorProperties GUID="{349C5851-65DF-11DA-9384-00065B846F21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>0</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http:https://localhost:5443/</IISUrl>
<OverrideIISAppRootUrl>True</OverrideIISAppRootUrl>
<IISAppRootUrl>http:https://localhost:5443/</IISAppRootUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>
Binary file added images/logged-in.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/web-login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/web-properties.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5a56da8

Please sign in to comment.