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
@if (Request.IsAuthenticated) { | |
<text> | |
<ul class="nav navbar-nav navbar-right"> | |
<li class="navbar-text"> | |
Hello, @User.Identity.Name! | |
</li> | |
<li> | |
@Html.ActionLink("Sign out", "SignOut", "Account") | |
</li> | |
</ul> |
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
Add-PSSnapin "Microsoft.SharePoint.PowerShell" | |
$issuerID = "11111111-1111-1111-1111-111111111111" | |
$targetSiteUrl = "http://wingtipserver" | |
$targetSite = Get-SPSite $targetSiteUrl | |
$realm = Get-SPAuthenticationRealm -ServiceContext $targetSite | |
$registeredIssuerName = $issuerID + '@' + $realm |
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
$makecert = "C:\Program Files\Microsoft Office Servers\15.0\Tools\makecert.exe" | |
$certmgr = "C:\Program Files\Microsoft Office Servers\15.0\Tools\certmgr.exe" | |
# specify domain name for SSL certificate | |
$domain = "appserver.wingtip.com" | |
# create output directory to create SSL certificate file | |
$outputDirectory = "c:\Certs\" | |
New-Item $outputDirectory -ItemType Directory -Force -Confirm:$false | Out-Null |
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
var app = angular.module('adalO365CorsClient', [ | |
'ngRoute', | |
'ngAnimate', | |
'AdalAngular' // <<<< loading the ADAL JS Angular module | |
]); |
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
module adalO365CorsClient { | |
'use strict'; | |
export class Adal { | |
/** | |
* Configures ADAL JS with required info for the registered app in Azure AD. | |
* | |
* @param $httpProvider Angular's $httpProvider (needed by ADAL) | |
* @param adalSettings Settings for ADAL | |
* @param adalProvider ADAL JS' Angular provider. |
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
module adalO365CorsClient { | |
'use strict'; | |
export class Routes { | |
/** | |
* Configures the routes for the application. | |
* @param $routeProvider | |
*/ | |
static configure($routeProvider:ng.route.IRouteProvider):void { | |
var baseUrl = 'app/'; |
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
{ | |
"version": "0.1.0", | |
"configurations": [ | |
{ | |
"name": "Launch yo", | |
"type": "node", | |
// NOTE: this should be the result of running `which yo` on your system... | |
// for the typical NPM install & config, this is usually /usr/local/bin/yo | |
// however others (as below) may have global NPM packages setup in a | |
// different path as common to avoid using sudo on OS X |
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
'use strict'; | |
var gulp = require('gulp'); | |
var mocha = require('gulp-mocha'); | |
/** | |
* Execute all tests. | |
*/ | |
gulp.task('run-tests', function () { | |
return gulp.src('test/**/*.js', { read: false }) |
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
{ | |
"version": "0.1.0", | |
"command": "gulp", | |
"isShellCommand": true, | |
"args": [], | |
"tasks": [ | |
{ | |
"taskName": "run-tests", | |
"isTestCommand": true, | |
"isBuildCommand": false |