This file contains hidden or 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
| -----> Fetching custom git buildpack... done | |
| -----> Node.js app detected | |
| -----> Resetting git environment | |
| -----> Requested node range: 0.10.x | |
| -----> Resolved node version: 0.10.37 | |
| -----> Downloading and installing node | |
| -----> Found existing node_modules directory; skipping cache | |
| -----> Rebuilding any native dependencies | |
| npm ERR! Error: ENOENT, chmod '/tmp/build_fe96d48b9176f0b5f8511ef2027fbb04/johnkors-links-8222ebff54166620757a30c92cf1f992be94032e/node_modules/googleapis/node_modules/request/node_modules/node-uuid/bin/uuid' | |
| npm ERR! If you need help, you may report this *entire* log, |
This file contains hidden or 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
| at System.Threading.CancellationToken.ThrowOperationCanceledException() | |
| at System.Web.Http.Owin.HttpMessageHandlerAdapter.<BufferResponseContentAsync>d__13.MoveNext() in c:\ballen\github\thinktecture\IdSrv3\Thinktecture.IdentityServer3\source\Core\Services\Default\DefaultConsentService.cs:line 0 | |
| --- End of stack trace from previous location where exception was thrown --- | |
| at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() | |
| at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) | |
| at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) | |
| at System.Web.Http.Owin.HttpMessageHandlerAdapter.<InvokeCore>d__0.MoveNext() in c:\ballen\github\thinktecture\IdSrv3\Thinktecture.IdentityServer3\source\Core\Services\Default\DefaultConsentService.cs:line 0 | |
| --- End of stack trace from previous location where exception was thrown --- | |
| at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() | |
| at System.Runtime.CompilerServices.T |
This file contains hidden or 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 class CustomHandleErrorAttribute : HandleErrorAttribute | |
| { | |
| private static readonly ILog _log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | |
| public override void OnException(ExceptionContext filterContext) | |
| { | |
| _log.Error("Internal server error occurred while handling web request.", filterContext.Exception); | |
| if (!filterContext.HttpContext.IsCustomErrorEnabled) | |
| { | |
| return; |
This file contains hidden or 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 void Configuration(IAppBuilder app) | |
| { | |
| app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions | |
| { | |
| Notifications = new OpenIdConnectAuthenticationNotifications | |
| { | |
| RedirectToIdentityProvider = RedirectToIdProvider | |
| } | |
| }); | |
| } |
This file contains hidden or 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
| <# | |
| .SYNOPSIS | |
| Fetches an access token using the IdentityServer3 token endpoint | |
| .DESCRIPTION | |
| Modify the parameters so it matches your IdentityServer3 instance. | |
| .NOTES | |
| File Name : GetToken.ps1 | |
| Author : John Korsnes (@johnkors, johnkors) | |
| Prerequisite : PowerShell V3 | |
| .LINK |
This file contains hidden or 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
| echo "*** Welcome, John! ***" | |
| set "GIT_INSTALL_ROOT=C:\tools\msysgit" | |
| :: Add git to the path | |
| if defined GIT_INSTALL_ROOT ( | |
| set "PATH=%GIT_INSTALL_ROOT%\bin;%GIT_INSTALL_ROOT%\usr\bin;%GIT_INSTALL_ROOT%\usr\share\vim\vim74;%PATH%" | |
| :: define SVN_SSH so we can use git svn with ssh svn repositories | |
| if not defined SVN_SSH set "SVN_SSH=%GIT_INSTALL_ROOT:\=\\%\\bin\\ssh.exe" | |
| ) |
This file contains hidden or 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
| https://aspnetcore.slack.com/archives/dotnet-core/p1481195518000050 | |
| johnkors [12:11 PM] | |
| what do I, as a library author, gain by depending on `NETStandard.Library` instead of explicitly _just_ the nugets I need? (edited) | |
| johnkors [12:26 PM] | |
| - Some do : https://www.nuget.org/packages/xunit.abstractions/ @bradwilson | |
| - Others don't : https://www.nuget.org/packages/Newtonsoft.Json/9.0.1 , @jamesnk | |
| Wonder what's "better"; or why one would prefer one over the other. (edited) |
This file contains hidden or 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
| using System; | |
| using System.Net; | |
| using System.Net.Mail; | |
| public class Email | |
| { | |
| public string From; | |
| public string To; | |
| public string Subject; | |
| public string Text; |
This file contains hidden or 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
| asdads | |
| +2 | |
| 3434 |
This file contains hidden or 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
| private static bool IsValid(string encodedPayload, string signature) | |
| { | |
| return Hash(DISCOURSE_SECRET, encodedPayload) == signature; | |
| } | |
| private static string Hash(string secret, string encodedPayload) | |
| { | |
| var hasher = new HMACSHA256(Encoding.UTF8.GetBytes(secret)); | |
| var hash = hasher.ComputeHash(Encoding.UTF8.GetBytes(encodedPayload)); | |
| return BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant(); |