Skip to content
This repository has been archived by the owner on Dec 14, 2017. It is now read-only.

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
Conflicts:
	README.md
  • Loading branch information
brockallen committed Aug 12, 2015
2 parents 4b7c509 + e888a90 commit e69e708
Show file tree
Hide file tree
Showing 33 changed files with 674 additions and 343 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,4 @@ distribution/

#Roslyn compiler temp folders
*.sln.ide/
source/IdentityServer3.AccessTokenValidation.sln.GhostDoc.xml
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ You can either validate the tokens locally (JWTs only) or use the IdentityServer
```csharp
app.UseIdentityServerBearerTokenAuthentication(new IdentityServerBearerTokenAuthenticationOptions
{
Authority = "https://identityserver.io"
Authority = "https://identity.identityserver.io"
});
```

Expand All @@ -20,7 +20,7 @@ The middleware can also do the scope validation in one go.
```csharp
app.UseIdentityServerBearerTokenAuthentication(new IdentityServerBearerTokenAuthenticationOptions
{
Authority = "https://identityserver.io",
Authority = "https://identity.identityserver.io",
RequiredScopes = new[] { "api1", "api2" }
});
```
18 changes: 9 additions & 9 deletions default.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ properties {
$src_directory = "$base_directory\source"
$output_directory = "$base_directory\build"
$dist_directory = "$base_directory\distribution"
$sln_file = "$src_directory\Thinktecture.IdentityServer3.AccessTokenValidation.sln"
$sln_file = "$src_directory\IdentityServer3.AccessTokenValidation.sln"
$target_config = "Release"
$framework_version = "v4.5"
$xunit_path = "$src_directory\packages\xunit.runners.1.9.2\tools\xunit.console.clr4.exe"
$ilmerge_path = "$src_directory\packages\ILMerge.2.13.0307\ILMerge.exe"
$nuget_path = "$src_directory\.nuget\nuget.exe"

$buildNumber = 0;
$version = "1.2.3.0"
$version = "2.0.0.0"
$preRelease = $null
}

Expand Down Expand Up @@ -53,19 +53,19 @@ task UpdateVersion {
}

task ILMerge -depends Compile {
$input_dlls = "$output_directory\Thinktecture.IdentityServer.v3.AccessTokenValidation.dll"
$input_dlls = "$output_directory\IdentityServer.v3.AccessTokenValidation.dll"

Get-ChildItem -Path $output_directory -Filter *.dll |
foreach-object {
# Exclude Thinktecture.IdentityServer.Core.dll as that will be the primary assembly
if ("$_" -ne "Thinktecture.IdentityServer.v3.AccessTokenValidation.dll" -and
# Exclude IdentityServer3.AccessTokenValidation.dll as that will be the primary assembly
if ("$_" -ne "IdentityServer3.AccessTokenValidation.dll" -and
"$_" -ne "Owin.dll") {
$input_dlls = "$input_dlls $output_directory\$_"
}
}

New-Item $dist_directory\lib\net45 -Type Directory
Invoke-Expression "$ilmerge_path /targetplatform:v4 /internalize:ilmerge.exclude /allowDup /target:library /out:$dist_directory\lib\net45\Thinktecture.IdentityServer.v3.AccessTokenValidation.dll $input_dlls"
Invoke-Expression "$ilmerge_path /targetplatform:v4 /internalize:ilmerge.exclude /allowDup /target:library /out:$dist_directory\lib\net45\IdentityServer.v3.AccessTokenValidation.dll $input_dlls"
}

task CreateNuGetPackage -depends Compile {
Expand All @@ -87,8 +87,8 @@ task CreateNuGetPackage -depends Compile {
}

New-Item $dist_directory\lib\net45 -Type Directory
copy-item $output_directory\Thinktecture.IdentityServer3.AccessTokenValidation.* $dist_directory\lib\net45
copy-item $output_directory\IdentityServer3.AccessTokenValidation.* $dist_directory\lib\net45

copy-item $src_directory\Thinktecture.IdentityServer3.AccessTokenValidation.nuspec $dist_directory
exec { . $nuget_path pack $dist_directory\Thinktecture.IdentityServer3.AccessTokenValidation.nuspec -BasePath $dist_directory -o $dist_directory -version $packageVersion }
copy-item $src_directory\IdentityServer3.AccessTokenValidation.nuspec $dist_directory
exec { . $nuget_path pack $dist_directory\IdentityServer3.AccessTokenValidation.nuspec -BasePath $dist_directory -o $dist_directory -version $packageVersion }
}
2 changes: 1 addition & 1 deletion mygetpush.cmd
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nuget push distribution\*.nupkg -Source https://www.myget.org/F/thinktecture/
nuget push distribution\*.nupkg -Source https://www.myget.org/F/identity/
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,33 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="FluentAssertions, Version=3.2.2.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\FluentAssertions.3.2.2\lib\net45\FluentAssertions.dll</HintPath>
<Reference Include="FluentAssertions, Version=3.4.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.3.4.1\lib\net45\FluentAssertions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentAssertions.Core, Version=3.2.2.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\FluentAssertions.3.2.2\lib\net45\FluentAssertions.Core.dll</HintPath>
<Reference Include="FluentAssertions.Core, Version=3.4.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.3.4.1\lib\net45\FluentAssertions.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="IdentityModel.Net45, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\IdentityModel.1.0.0\lib\net45\IdentityModel.Net45.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.Owin.3.0.0\lib\net45\Microsoft.Owin.dll</HintPath>
<HintPath>..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Security, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="Microsoft.Owin.Security, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.Owin.Security.3.0.0\lib\net45\Microsoft.Owin.Security.dll</HintPath>
<HintPath>..\packages\Microsoft.Owin.Security.3.0.1\lib\net45\Microsoft.Owin.Security.dll</HintPath>
</Reference>
<Reference Include="Moq">
<HintPath>..\packages\Moq.4.2.1409.1722\lib\net40\Moq.dll</HintPath>
<Reference Include="Moq, Version=4.2.1507.118, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.2.1507.0118\lib\net40\Moq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand All @@ -59,15 +68,12 @@
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IdentityModel" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Thinktecture.IdentityModel.Core, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Thinktecture.IdentityModel.Core.1.3.0\lib\net45\Thinktecture.IdentityModel.Core.dll</HintPath>
</Reference>
<Reference Include="xunit">
<HintPath>..\packages\xunit.1.9.2\lib\net20\xunit.dll</HintPath>
</Reference>
Expand All @@ -77,6 +83,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Moq;
using IdentityModel;
using IdentityServer3.AccessTokenValidation;
using Moq;
using System;
using System.Collections.Generic;
using System.Security.Claims;
using Thinktecture.IdentityModel.Extensions;
using Thinktecture.IdentityServer.AccessTokenValidation;
using Xunit;

namespace AccessTokenValidation.Tests
Expand Down
23 changes: 23 additions & 0 deletions source/AccessTokenValidation.Tests/app.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.20622.1351" newVersion="4.0.20622.1351" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
11 changes: 6 additions & 5 deletions source/AccessTokenValidation.Tests/packages.config
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FluentAssertions" version="3.2.2" targetFramework="net45" />
<package id="Microsoft.Owin" version="3.0.0" targetFramework="net45" />
<package id="Microsoft.Owin.Security" version="3.0.0" targetFramework="net45" />
<package id="Moq" version="4.2.1409.1722" targetFramework="net45" />
<package id="FluentAssertions" version="3.4.1" targetFramework="net45" />
<package id="IdentityModel" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security" version="3.0.1" targetFramework="net45" />
<package id="Moq" version="4.2.1507.0118" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
<package id="Owin" version="1.0" targetFramework="net45" />
<package id="Thinktecture.IdentityModel.Core" version="1.3.0" targetFramework="net45" />
<package id="xunit" version="1.9.2" targetFramework="net45" />
<package id="xunit.runner.visualstudio" version="0.99.9-build1021" targetFramework="net45" />
</packages>
65 changes: 37 additions & 28 deletions source/AccessTokenValidation/AccessTokenValidation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<ProjectGuid>{DF867B5D-3A9E-443A-B95E-D8F11E2A88A3}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Thinktecture.IdentityServer.AccessTokenValidation</RootNamespace>
<AssemblyName>Thinktecture.IdentityServer3.AccessTokenValidation</AssemblyName>
<RootNamespace>IdentityServer3.AccessTokenValidation</RootNamespace>
<AssemblyName>IdentityServer3.AccessTokenValidation</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
Expand All @@ -20,7 +20,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>..\..\build\Thinktecture.IdentityServer3.AccessTokenValidation.XML</DocumentationFile>
<DocumentationFile>..\..\build\IdentityServer3.AccessTokenValidation.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -29,43 +29,48 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>..\..\build\Thinktecture.IdentityServer3.AccessTokenValidation.XML</DocumentationFile>
<DocumentationFile>..\..\build\IdentityServer3.AccessTokenValidation.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.IdentityModel.Protocol.Extensions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.IdentityModel.Protocol.Extensions.1.0.1\lib\net45\Microsoft.IdentityModel.Protocol.Extensions.dll</HintPath>
<HintPath>..\packages\Microsoft.IdentityModel.Protocol.Extensions.1.0.0\lib\net45\Microsoft.IdentityModel.Protocol.Extensions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin">
<Reference Include="Microsoft.Owin, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.3.0.0\lib\net45\Microsoft.Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin.Security">
<Reference Include="Microsoft.Owin.Security, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Security.3.0.0\lib\net45\Microsoft.Owin.Security.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin.Security.Jwt">
<Reference Include="Microsoft.Owin.Security.Jwt, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Security.Jwt.3.0.0\lib\net45\Microsoft.Owin.Security.Jwt.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin.Security.OAuth">
<Reference Include="Microsoft.Owin.Security.OAuth, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Security.OAuth.3.0.0\lib\net45\Microsoft.Owin.Security.OAuth.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Owin">
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IdentityModel" />
<Reference Include="System.IdentityModel.Tokens.Jwt, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\System.IdentityModel.Tokens.Jwt.4.0.1\lib\net45\System.IdentityModel.Tokens.Jwt.dll</HintPath>
<HintPath>..\packages\System.IdentityModel.Tokens.Jwt.4.0.0\lib\net45\System.IdentityModel.Tokens.Jwt.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.Formatting, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.2\lib\net45\System.Net.Http.Formatting.dll</HintPath>
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Runtime.Caching" />
Expand All @@ -76,27 +81,31 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AsyncHelper.cs" />
<Compile Include="CachingDiscoveryIssuerSecurityTokenProvider.cs" />
<Compile Include="Clock.cs" />
<Compile Include="EpochTimeExtensions.cs" />
<Compile Include="ICache.cs" />
<Compile Include="IValidationResultCache.cs" />
<Compile Include="IClock.cs" />
<Compile Include="IdentityServerAccessTokenValidationAppBuilderExtensions.cs" />
<Compile Include="IdentityServerBearerTokensAuthenticationOptions.cs" />
<Compile Include="Cache.cs" />
<Compile Include="InMemoryValidationResultCache.cs" />
<Compile Include="IdentityServerOAuthBearerAuthenticationOptions.cs" />
<Compile Include="IdentityServerBearerTokenAuthenticationOptions.cs" />
<Compile Include="IdentityServerBearerTokenValidationAppBuilderExtensions.cs" />
<Compile Include="IdentityServerBearerTokenValidationMiddleware.cs" />
<Compile Include="Plumbing\AsyncHelper.cs" />
<Compile Include="Plumbing\Cache.cs" />
<Compile Include="Plumbing\Clock.cs" />
<Compile Include="Plumbing\ContextTokenProvider.cs" />
<Compile Include="Plumbing\DiscoveryDocumentIssuerSecurityTokenProvider.cs" />
<Compile Include="Plumbing\EpochTimeExtensions.cs" />
<Compile Include="Plumbing\ICache.cs" />
<Compile Include="Plumbing\IClock.cs" />
<Compile Include="Plumbing\InMemoryValidationResultCache.cs" />
<Compile Include="Plumbing\IValidationResultCache.cs" />
<Compile Include="Plumbing\StringExtensions.cs" />
<Compile Include="Plumbing\ValidationEndpointTokenProvider.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ScopeRequirementMiddleware.cs" />
<Compile Include="StringExtensions.cs" />
<Compile Include="ValidationEndpointTokenProvider.cs" />
<Compile Include="ValidationMode.cs" />
</ItemGroup>
<ItemGroup>
<None Include="..\default.licenseheader">
<Link>default.licenseheader</Link>
</None>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
Loading

0 comments on commit e69e708

Please sign in to comment.