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
//String Enums, supported TS 2.4 onwards | |
export enum AppEventsEnum { | |
ReachedHome = "reached-home", | |
ReachedWork = "reached-work", | |
TurnOnLight = "turnOn-light", | |
TurnOffLight = "turnOff-light", | |
PublishArticle = "publish-article" | |
} |
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
import { Component } from '@angular/core'; | |
import { Events } from 'ionic-angular'; | |
import { AppEventsEnum } from '../Enums/AppEvents'; | |
@Component({ | |
selector: 'publisher', | |
templateUrl: 'publisher.html' | |
}) | |
export class Publisher { |
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 Microsoft.AspNet.Identity | |
@if (Request.IsAuthenticated) | |
{ | |
using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" })) | |
{ | |
@Html.AntiForgeryToken() | |
<ul class="nav navbar-nav navbar-right"> | |
<li> | |
@Html.ActionLink("Hello " + @appUserClaims.GivenName + "!", "Index", "Manage", routeValues: null, htmlAttributes: new { title = "Manage" }) |
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
... | |
... | |
<system.web.webPages.razor> | |
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | |
<strong><pages pageBaseType="csWinAuthWClaims.Views.AppCommonViewUtils"></strong> | |
<namespaces> | |
<add namespace="System.Web.Mvc" /> | |
<add namespace="System.Web.Mvc.Ajax" /> | |
<add namespace="System.Web.Mvc.Html" /> | |
<add namespace="System.Web.Optimization"/> |
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.Collections.Generic; | |
using System.Linq; | |
using System.Security.Claims; | |
using System.Web; | |
using System.Web.Mvc; | |
namespace csWinAuthWClaims.Views | |
{ |
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.Collections.Generic; | |
using System.Linq; | |
using System.Security.Claims; | |
using System.Web; | |
namespace csWinAuthWClaims.Views | |
{ | |
public class AppUserPrincipalClaims : ClaimsPrincipal |
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.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
using csWinAuthWClaims.Attributes; | |
namespace csWinAuthWClaims.Controllers | |
{ | |
[AppClaimsAuthorize(ClaimType="myAppUserRole", ClaimValue="myAppAdmin")] |
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
<div *ngIf="albums.length > 0"> | |
<span> User Albums </span> | |
... | |
</div> |
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
{ | |
"id":"123", | |
"name":"Test User Two", | |
"first_name":"Test", | |
"middle_name":"User", | |
"last_name":"Two", | |
"picture":{ | |
"data":{ | |
"is_silhouette":true, | |
"url":454353" |
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
// Karma configuration | |
// Generated on Sun Jun 04 2017 19:05:24 GMT-0500 (Central Daylight Time) | |
module.exports = function(config) { | |
config.set({ | |
// base path that will be used to resolve all patterns (eg. files, exclude) | |
basePath: '', | |
// frameworks to use | |
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter |