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
[HttpPost] | |
[AllowAnonymous] | |
[Route("FacebookLogin")] | |
public async Task<IHttpActionResult> FacebookLogin([FromBody] string token) | |
{ | |
if (string.IsNullOrEmpty(token)) | |
{ | |
return BadRequest("Invalid OAuth access token"); | |
} |
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 partial class Startup | |
{ | |
/// <summary> | |
/// This part has been added to have an API endpoint to authenticate users that accept a Facebook access token | |
/// </summary> | |
static Startup() | |
{ | |
PublicClientId = "self"; | |
UserManagerFactory = () => |
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
using System; | |
using System.Collections.Generic; | |
using System.Data.Entity; | |
using System.Data.Entity.ModelConfiguration; | |
using System.Data.Entity.ModelConfiguration.Configuration; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using DelegateDecompiler; |
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
/// <summary> | |
/// Handles assembling html documents single set of ng-template items. | |
/// </summary> | |
public class AngularTempalteTransform : IBundleTransform | |
{ | |
/// <summary> | |
/// Process the bundle. | |
/// </summary> | |
/// <param name="context">The current bundle context.</param> | |
/// <param name="response">The response object to write to.</param> |
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 enum Cacheability | |
{ | |
NoCache, | |
Private, | |
Public, | |
} |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var server = WebApp.Start("http://localhost:1002/", (app) => | |
{ | |
var config = new HttpConfiguration(); | |
config.MapHttpAttributeRoutes(); | |
config.Services.Replace(typeof(IExceptionHandler), new RethrowExceptionHandler()); |
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
using System; | |
using System.IO; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Web.Mvc; | |
namespace DemoApp | |
{ | |
public class ExternalJavaScriptFileAttribute : ActionFilterAttribute | |
{ |
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
/** | |
* AngularUI - The companion suite for AngularJS | |
* @version v0.3.2 - 2012-12-04 | |
* @link http://angular-ui.github.com | |
* @license MIT License, http://www.opensource.org/licenses/MIT | |
*/ | |
angular.module('ui.config', []).value('ui.config', {}); | |
angular.module('ui.filters', ['ui.config']); |
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
anglar.module('myApp',['ui']).config(["$provide", function($provide) { | |
return $provide.decorator("$http", ["$delegate", function($delegate) { | |
var get = $delegate.get; | |
$delegate.get = function(url, config) { | |
// Check is to avoid breaking AngularUI ui-bootstrap-tpls.js: "template/accordion/accordion-group.html" | |
if (url.indexOf('template/')) { | |
// Append ?v=[cacheBustVersion] to url | |
url += (url.indexOf("?") === -1 ? "?" : "&"); | |
url += "v=" + cacheBustVersion; | |
} |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
namespace Bleroy.Helpers { | |
public static class NotNull { | |
public static TProp Get<TSource, TProp>(this TSource source, Expression<Func<TSource, TProp>> property) where TSource : class { | |
if (source == null) return default(TProp); | |
var current = property.Body; |