This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"C:\Program Files (x86)\IIS Express\IisExpressAdminCmd.exe" setupSslUrl -url:https://test.local:44333 -CertHash:<thumbprint> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Generates a new cert in a .pfx file | |
# | |
param( | |
[Parameter(Mandatory = $true)] | |
$Name, | |
[Parameter(Mandatory = $true)] | |
$Password, | |
$Duration = 120 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class PrincipalExtensions | |
{ | |
public static string GetValue(this ClaimsPrincipal user, string type) | |
{ | |
var claim = user.FindFirst(type); | |
if (claim != null) return claim.Value; | |
return null; | |
} | |
public static string GetValue(this IPrincipal user, string type) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>mvcaction</Title> | |
<Shortcut>mvcaction</Shortcut> | |
<Description>Code snippet for an action.</Description> | |
<Author>Microsoft Corporation</Author> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Common | |
{ | |
public class AdapterConfigurationManager : IConfigurationManager<OpenIdConnectConfiguration> | |
{ | |
private readonly IConfigurationManager<OpenIdConnectConfiguration> _inner; | |
public AdapterConfigurationManager(IConfigurationManager<OpenIdConnectConfiguration> inner) | |
{ | |
_inner = inner; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
md identity | |
cd identity | |
md server3 | |
cd server3 | |
git clone -b dev https://github.com/IdentityServer/IdentityServer3.git IdentityServer3 | |
git clone -b dev https://github.com/IdentityServer/IdentityServer3.AccessTokenValidation.git AccessTokenValidation | |
git clone -b dev https://github.com/IdentityServer/IdentityServer3.Samples.git Samples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#myForm input').on('invalid', function(e) { | |
e.preventDefault(); | |
var msg = e.target.validationMessage; | |
// Display msg here... | |
}); |