Skip to content

Commit cd63ac6

Browse files
committed
oidc rp conformance test code
1 parent 920d484 commit cd63ac6

16 files changed

Lines changed: 17266 additions & 0 deletions

‎test/conformance/Oidc-Client-Conformance/.vs/config/applicationhost.config‎

Lines changed: 1039 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.25420.1
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Oidc-Client-Conformance", "Oidc-Client-Conformance\Oidc-Client-Conformance.csproj", "{78D83E70-6DA9-44C6-9F8E-FEEB0897EDE0}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{78D83E70-6DA9-44C6-9F8E-FEEB0897EDE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{78D83E70-6DA9-44C6-9F8E-FEEB0897EDE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{78D83E70-6DA9-44C6-9F8E-FEEB0897EDE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{78D83E70-6DA9-44C6-9F8E-FEEB0897EDE0}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
4+
<Import Project="..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" />
5+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
6+
<PropertyGroup>
7+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9+
<ProductVersion>
10+
</ProductVersion>
11+
<SchemaVersion>2.0</SchemaVersion>
12+
<ProjectGuid>{78D83E70-6DA9-44C6-9F8E-FEEB0897EDE0}</ProjectGuid>
13+
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
14+
<OutputType>Library</OutputType>
15+
<AppDesignerFolder>Properties</AppDesignerFolder>
16+
<RootNamespace>Oidc_Client_Conformance</RootNamespace>
17+
<AssemblyName>Oidc-Client-Conformance</AssemblyName>
18+
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
19+
<UseIISExpress>true</UseIISExpress>
20+
<IISExpressSSLPort />
21+
<IISExpressAnonymousAuthentication />
22+
<IISExpressWindowsAuthentication />
23+
<IISExpressUseClassicPipelineMode />
24+
<UseGlobalApplicationHostFile />
25+
<NuGetPackageImportStamp>
26+
</NuGetPackageImportStamp>
27+
</PropertyGroup>
28+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
29+
<DebugSymbols>true</DebugSymbols>
30+
<DebugType>full</DebugType>
31+
<Optimize>false</Optimize>
32+
<OutputPath>bin\</OutputPath>
33+
<DefineConstants>DEBUG;TRACE</DefineConstants>
34+
<ErrorReport>prompt</ErrorReport>
35+
<WarningLevel>4</WarningLevel>
36+
</PropertyGroup>
37+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
38+
<DebugType>pdbonly</DebugType>
39+
<Optimize>true</Optimize>
40+
<OutputPath>bin\</OutputPath>
41+
<DefineConstants>TRACE</DefineConstants>
42+
<ErrorReport>prompt</ErrorReport>
43+
<WarningLevel>4</WarningLevel>
44+
</PropertyGroup>
45+
<ItemGroup>
46+
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
47+
<HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
48+
<Private>True</Private>
49+
</Reference>
50+
<Reference Include="Microsoft.CSharp" />
51+
<Reference Include="System.Web.DynamicData" />
52+
<Reference Include="System.Web.Entity" />
53+
<Reference Include="System.Web.ApplicationServices" />
54+
<Reference Include="System.ComponentModel.DataAnnotations" />
55+
<Reference Include="System" />
56+
<Reference Include="System.Data" />
57+
<Reference Include="System.Core" />
58+
<Reference Include="System.Data.DataSetExtensions" />
59+
<Reference Include="System.Web.Extensions" />
60+
<Reference Include="System.Xml.Linq" />
61+
<Reference Include="System.Drawing" />
62+
<Reference Include="System.Web" />
63+
<Reference Include="System.Xml" />
64+
<Reference Include="System.Configuration" />
65+
<Reference Include="System.Web.Services" />
66+
<Reference Include="System.EnterpriseServices" />
67+
</ItemGroup>
68+
<ItemGroup>
69+
<Content Include="id_token_tests.js" />
70+
<Content Include="app.css" />
71+
<Content Include="callback.html" />
72+
<Content Include="configuration_tests.js" />
73+
<Content Include="log.js" />
74+
<Content Include="packages.config" />
75+
<None Include="Web.Debug.config">
76+
<DependentUpon>Web.config</DependentUpon>
77+
</None>
78+
<None Include="Web.Release.config">
79+
<DependentUpon>Web.config</DependentUpon>
80+
</None>
81+
</ItemGroup>
82+
<ItemGroup>
83+
<Content Include="id_token_token_tests.js" />
84+
<Content Include="index.html" />
85+
<Content Include="oidc-client.js" />
86+
<Content Include="Web.config" />
87+
</ItemGroup>
88+
<ItemGroup>
89+
<Compile Include="Properties\AssemblyInfo.cs" />
90+
</ItemGroup>
91+
<PropertyGroup>
92+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
93+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
94+
</PropertyGroup>
95+
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
96+
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
97+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
98+
<ProjectExtensions>
99+
<VisualStudio>
100+
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
101+
<WebProjectProperties>
102+
<UseIIS>True</UseIIS>
103+
<AutoAssignPort>True</AutoAssignPort>
104+
<DevelopmentServerPort>14174</DevelopmentServerPort>
105+
<DevelopmentServerVPath>/</DevelopmentServerVPath>
106+
<IISUrl>http://localhost:14174/</IISUrl>
107+
<NTLMAuthentication>False</NTLMAuthentication>
108+
<UseCustomServer>False</UseCustomServer>
109+
<CustomServerUrl>
110+
</CustomServerUrl>
111+
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
112+
</WebProjectProperties>
113+
</FlavorProperties>
114+
</VisualStudio>
115+
</ProjectExtensions>
116+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
117+
<PropertyGroup>
118+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
119+
</PropertyGroup>
120+
<Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props'))" />
121+
<Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
122+
</Target>
123+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
124+
Other similar extension points exist, see Microsoft.Common.targets.
125+
<Target Name="BeforeBuild">
126+
</Target>
127+
<Target Name="AfterBuild">
128+
</Target>
129+
-->
130+
</Project>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("Oidc_Client_Conformance")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("Oidc_Client_Conformance")]
13+
[assembly: AssemblyCopyright("Copyright © 2017")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("78d83e70-6da9-44c6-9f8e-feeb0897ede0")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Revision and Build Numbers
33+
// by using the '*' as shown below:
34+
[assembly: AssemblyVersion("1.0.0.0")]
35+
[assembly: AssemblyFileVersion("1.0.0.0")]
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
4+
5+
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
6+
<!--
7+
In the example below, the "SetAttributes" transform will change the value of
8+
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
9+
finds an attribute "name" that has a value of "MyDB".
10+
11+
<connectionStrings>
12+
<add name="MyDB"
13+
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
14+
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
15+
</connectionStrings>
16+
-->
17+
<system.web>
18+
<!--
19+
In the example below, the "Replace" transform will replace the entire
20+
<customErrors> section of your web.config file.
21+
Note that because there is only one customErrors section under the
22+
<system.web> node, there is no need to use the "xdt:Locator" attribute.
23+
24+
<customErrors defaultRedirect="GenericError.htm"
25+
mode="RemoteOnly" xdt:Transform="Replace">
26+
<error statusCode="500" redirect="InternalError.htm"/>
27+
</customErrors>
28+
-->
29+
</system.web>
30+
</configuration>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
4+
5+
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
6+
<!--
7+
In the example below, the "SetAttributes" transform will change the value of
8+
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
9+
finds an attribute "name" that has a value of "MyDB".
10+
11+
<connectionStrings>
12+
<add name="MyDB"
13+
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
14+
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
15+
</connectionStrings>
16+
-->
17+
<system.web>
18+
<compilation xdt:Transform="RemoveAttributes(debug)" />
19+
<!--
20+
In the example below, the "Replace" transform will replace the entire
21+
<customErrors> section of your web.config file.
22+
Note that because there is only one customErrors section under the
23+
<system.web> node, there is no need to use the "xdt:Locator" attribute.
24+
25+
<customErrors defaultRedirect="GenericError.htm"
26+
mode="RemoteOnly" xdt:Transform="Replace">
27+
<error statusCode="500" redirect="InternalError.htm"/>
28+
</customErrors>
29+
-->
30+
</system.web>
31+
</configuration>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
For more information on how to configure your ASP.NET application, please visit
4+
http://go.microsoft.com/fwlink/?LinkId=169433
5+
-->
6+
<configuration>
7+
<system.web>
8+
<compilation debug="true" targetFramework="4.5.2"/>
9+
<httpRuntime targetFramework="4.5.2"/>
10+
</system.web>
11+
<system.codedom>
12+
<compilers>
13+
<compiler language="c#;cs;csharp" extension=".cs"
14+
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
15+
warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
16+
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
17+
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
18+
warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>
19+
</compilers>
20+
</system.codedom>
21+
</configuration>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pre {
2+
padding:10px;
3+
width: 100%;
4+
background-color: lightgray;
5+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>oidc-client test</title>
5+
<link rel='stylesheet' href='app.css'>
6+
</head>
7+
<body>
8+
<div id="message"></div>
9+
<div>
10+
<a href="/test">back to index</a>
11+
</div>
12+
<pre id='out'></pre>
13+
<script src='log.js'></script>
14+
<script src='oidc-client.js'></script>
15+
<script>
16+
Oidc.Log.logger = console;
17+
Oidc.Log.level = Oidc.Log.DEBUG;
18+
new Oidc.UserManager().signinRedirectCallback().then(function(user) {
19+
log("signin response success", user);
20+
21+
document.getElementById("message").innerText = "test: " + user.state;
22+
}).catch(function(err) {
23+
log(err);
24+
});
25+
</script>
26+
</body>
27+
</html>

0 commit comments

Comments
 (0)