16 | var directive = {
17 | // link: link,
18 | scope: {
19 | 'title': '@',
20 | 'subtitle': '@',
21 | 'rightText': '@',
22 | 'allowCollapse': '@'
23 | },
24 | templateUrl: 'app/widgets/widgetheader.html',
25 | restrict: 'A'
26 | };
27 | return directive;
28 |
29 | // function link(scope, element, attrs) {
30 | // attrs.$set('class', 'widget-head');
31 | // }
32 | }
33 | })();
34 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 e
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/IdentityServer_aspcore/IdSvrHost/UI/Error/ErrorController.cs:
--------------------------------------------------------------------------------
1 | using IdentityServer4.Core;
2 | using IdentityServer4.Core.Services;
3 | using Microsoft.AspNet.Mvc;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Linq;
7 | using System.Threading.Tasks;
8 |
9 | namespace IdSvrHost.UI.Error
10 | {
11 | public class ErrorController : Controller
12 | {
13 | private readonly ErrorInteraction _errorInteraction;
14 |
15 | public ErrorController(ErrorInteraction errorInteraction)
16 | {
17 | _errorInteraction = errorInteraction;
18 | }
19 |
20 | [Route(Constants.RoutePaths.Error, Name ="Error")]
21 | public async Task
Index(string id)
22 | {
23 | var vm = new ErrorViewModel();
24 |
25 | if (id != null)
26 | {
27 | var message = await _errorInteraction.GetRequestAsync(id);
28 | if (message != null)
29 | {
30 | vm.Error = message;
31 | }
32 | }
33 |
34 | return View("Error", vm);
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/IdentityServer_aspcore/IdSvrHost/wwwroot/css/site.less:
--------------------------------------------------------------------------------
1 | body {
2 | margin-top: 65px;
3 | }
4 |
5 | .navbar-header {
6 | position:relative;
7 | top:-4px;
8 | }
9 |
10 | .navbar-brand > .icon-banner {
11 | position:relative;
12 | top:-2px;
13 | display:inline;
14 | }
15 |
16 | .icon {
17 | position:relative;
18 | top:-10px;
19 | }
20 |
21 | .page-consent {
22 | .client-logo {
23 | float: left;
24 |
25 | img {
26 | width: 80px;
27 | height: 80px;
28 | }
29 | }
30 |
31 | .consent-buttons {
32 | margin-top: 25px;
33 | }
34 |
35 | .consent-form {
36 | .consent-scopecheck {
37 | display: inline-block;
38 | margin-right: 5px;
39 | }
40 |
41 | .consent-scopecheck[disabled] {
42 | //visibility:hidden;
43 | }
44 |
45 | .consent-description {
46 | margin-left: 25px;
47 |
48 | label {
49 | font-weight: normal;
50 | }
51 | }
52 |
53 | .consent-remember {
54 | padding-left: 16px;
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/ServiceStack/Punchcard.Angular1JWT/gulp/common.js:
--------------------------------------------------------------------------------
1 | (function (common) {
2 | var commentWrapper = require('./commentWrapper.js');
3 |
4 | common.createComments = createComments;
5 | common.formatPercent = formatPercent;
6 | common.bytediffFormatter = bytediffFormatter;
7 |
8 | function bytediffFormatter(data) {
9 | var difference = (data.savings > 0) ? ' smaller.' : ' larger.';
10 | return data.fileName + ' went from '
11 | + (data.startSize / 1000).toFixed(2) + ' kB to ' + (data.endSize / 1000).toFixed(2) + ' kB'
12 | + ' and is ' + common.formatPercent(1-data.percent, 2) + '%' + difference;
13 | }
14 |
15 | // Create standard comments header for minified files
16 | function createComments(gutil) {
17 | var comments = [
18 | 'John Papa',
19 | 'Copyright 2014',
20 | 'MIT License',
21 | 'Compiled on ' + gutil.date('mmm d, yyyy h:MM:ss TT Z')
22 | ];
23 | return commentWrapper.wrap(comments);
24 | }
25 |
26 | function formatPercent(num, precision){
27 | return (num*100).toFixed(precision);
28 | }
29 |
30 | })(module.exports)
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore Visual Studio Project #
2 | ###################
3 | *.user
4 | *.gpState
5 | *.suo
6 | **/bin
7 | **/obj
8 | /packages
9 | /WevAPI_aspcore
10 |
11 | # Ignore Node & Bower
12 | ###################
13 | **/node_modules
14 | /modular/client/build
15 | /modular/build
16 | **/bower_components
17 | **/test/coverage
18 | /reports
19 |
20 |
21 | # mongo db
22 | ###################
23 | #Don't commit Mongo Database files
24 | *.lock
25 | *.0
26 | *.1
27 | *.ns
28 | journal
29 |
30 | # Ignore Web Storm #
31 | .idea
32 |
33 | # Compiled source #
34 | ###################
35 | *.com
36 | *.class
37 | *.dll
38 | *.exe
39 | *.o
40 | *.so
41 | report/
42 |
43 | # Packages #
44 | ############
45 | # it's better to unpack these files and commit the raw source
46 | # git has its own built in compression methods
47 | *.7z
48 | *.dmg
49 | *.gz
50 | *.iso
51 | *.jar
52 | *.rar
53 | *.tar
54 | *.xap
55 | *.zip
56 |
57 | # Logs and databases #
58 | ######################
59 | *.log
60 | *.sql
61 | *.sqlite
62 | # *.sdf
63 | *.mdf
64 | *.ldf
65 |
66 | # OS generated files #
67 | ######################
68 | .DS_Store*
69 | ehthumbs.db
70 | Icon?
71 | Thumbs.db
72 | packages
73 |
74 |
--------------------------------------------------------------------------------
/ServiceStack/Punchcard.Angular1JWT/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore Visual Studio Project #
2 | ###################
3 | *.user
4 | *.gpState
5 | *.suo
6 | bin
7 | obj
8 | /packages
9 |
10 | # Ignore Node & Bower
11 | ###################
12 | node_modules
13 | /modular/client/build
14 | /modular/build
15 | bower_components
16 | **/test/coverage
17 | /reports
18 |
19 |
20 | # mongo db
21 | ###################
22 | #Don't commit Mongo Database files
23 | *.lock
24 | *.0
25 | *.1
26 | *.ns
27 | journal
28 |
29 | # Ignore Web Storm #
30 | .idea
31 |
32 | # Compiled source #
33 | ###################
34 | *.com
35 | *.class
36 | *.dll
37 | *.exe
38 | *.o
39 | *.so
40 | report/
41 |
42 | # Packages #
43 | ############
44 | # it's better to unpack these files and commit the raw source
45 | # git has its own built in compression methods
46 | *.7z
47 | *.dmg
48 | *.gz
49 | *.iso
50 | *.jar
51 | *.rar
52 | *.tar
53 | *.xap
54 | *.zip
55 |
56 | # Logs and databases #
57 | ######################
58 | *.log
59 | *.sql
60 | *.sqlite
61 | # *.sdf
62 | *.mdf
63 | *.ldf
64 |
65 | # OS generated files #
66 | ######################
67 | .DS_Store*
68 | ehthumbs.db
69 | Icon?
70 | Thumbs.db
71 | packages
72 |
73 |
--------------------------------------------------------------------------------
/ServiceStack/Punchcard.Angular1JWT/src/client/app/layout/topnav.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/IdentityServer_aspcore/IdSvrHost/UI/Home/Views/Index.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
13 |
14 |
15 |
16 | IdentityServer publishes a
17 | discovery document
18 | where you can find metadata and links to all the endpoints, key material, etc.
19 |
20 |
21 |
22 |
31 |
32 |
--------------------------------------------------------------------------------
/ServiceStack/Punchcard.Angular1JWT/src/client/test/midway/template.spec.js:
--------------------------------------------------------------------------------
1 | describe('Midway: templates', function() {
2 | it('should load the template for the avengers view properly',
3 | function(done) {
4 | var tester = ngMidwayTester('app');
5 | tester.visit('/avengers', function() {
6 | var current = tester.inject('$route').current;
7 | var controller = current.controller;
8 | var template = current.templateUrl;
9 | expect(template).to.match(/avengers\/avengers\.html/);
10 | tester.destroy();
11 | done();
12 | });
13 | });
14 |
15 | it('should load the template for the dashboard view properly',
16 | function(done) {
17 | var tester = ngMidwayTester('app');
18 | tester.visit('/', function() {
19 | var current = tester.inject('$route').current;
20 | var controller = current.controller;
21 | var template = current.templateUrl;
22 | expect(template).to.match(/dashboard\/dashboard\.html/);
23 | tester.destroy();
24 | done();
25 | });
26 | });
27 | });
--------------------------------------------------------------------------------
/ServiceStack/Punchcard.Angular1JWT/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ServiceStack/Punchcard.Angular1JWT/src/client/test/specs/dashboard-route.spec.js:
--------------------------------------------------------------------------------
1 | /* jshint -W117, -W030 */
2 | describe('dashboard', function () {
3 | describe('route', function () {
4 | var controller;
5 |
6 | beforeEach(function() {
7 | module('app', specHelper.fakeLogger);
8 | specHelper.injector(function($httpBackend, $location, $rootScope, $route) {});
9 | $httpBackend.expectGET('app/dashboard/dashboard.html').respond(200);
10 | });
11 |
12 | it('should map / route to dashboard View template', function () {
13 | expect($route.routes['/'].templateUrl).
14 | to.equal('app/dashboard/dashboard.html');
15 | });
16 |
17 | it('should route / to the dashboard View', function () {
18 | $location.path('/');
19 | $rootScope.$digest();
20 | expect($route.current.templateUrl).to.equal('app/dashboard/dashboard.html');
21 | });
22 |
23 | it('should route /invalid to the otherwise (dashboard) route', function () {
24 | $location.path('/invalid');
25 | $rootScope.$digest();
26 | expect($route.current.templateUrl).to.equal('app/dashboard/dashboard.html');
27 | });
28 | });
29 | });
--------------------------------------------------------------------------------
/ServiceStack/Punchcard.Angular1JWT/src/client/app/layout/sidebar.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | 'use strict';
3 |
4 | angular
5 | .module('app.layout')
6 | .controller('Sidebar', Sidebar);
7 |
8 | Sidebar.$inject = ['$route', 'routehelper'];
9 |
10 | function Sidebar($route, routehelper) {
11 | /*jshint validthis: true */
12 | var vm = this;
13 | var routes = routehelper.getRoutes();
14 | vm.isCurrent = isCurrent;
15 | //vm.sidebarReady = function(){console.log('done animating menu')}; // example
16 |
17 | activate();
18 |
19 | function activate() { getNavRoutes(); }
20 |
21 | function getNavRoutes() {
22 | vm.navRoutes = routes.filter(function(r) {
23 | return r.settings && r.settings.nav;
24 | }).sort(function(r1, r2) {
25 | return r1.settings.nav - r2.settings.nav;
26 | });
27 | }
28 |
29 | function isCurrent(route) {
30 | if (!route.title || !$route.current || !$route.current.title) {
31 | return '';
32 | }
33 | var menuName = route.title;
34 | return $route.current.title.substr(0, menuName.length) === menuName ? 'current' : '';
35 | }
36 | }
37 | })();
38 |
--------------------------------------------------------------------------------
/ServiceStack/Punchard.ServiceStackJWTExample.Tests/UnitTests.cs:
--------------------------------------------------------------------------------
1 | using NUnit.Framework;
2 | using Punchard.ServiceStackJWT.ServiceInterface;
3 | using Punchard.ServiceStackJWTExample.ServiceModel;
4 | using ServiceStack;
5 | using ServiceStack.Testing;
6 |
7 | namespace Punchard.ServiceStackJWTExample.Tests
8 | {
9 | [TestFixture]
10 | public class UnitTests
11 | {
12 | private readonly ServiceStackHost appHost;
13 |
14 | public UnitTests()
15 | {
16 | appHost = new BasicAppHost(typeof(MyServices).Assembly)
17 | {
18 | ConfigureContainer = container =>
19 | {
20 | //Add your IoC dependencies here
21 | }
22 | }
23 | .Init();
24 | }
25 |
26 | [TestFixtureTearDown]
27 | public void TestFixtureTearDown()
28 | {
29 | appHost.Dispose();
30 | }
31 |
32 | [Test]
33 | public void TestMethod1()
34 | {
35 | var service = appHost.Container.Resolve();
36 |
37 | var response = (HelloResponse)service.Any(new Hello { Name = "World" });
38 |
39 | Assert.That(response.Result, Is.EqualTo("Hello, World!"));
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/ServiceStack/Punchard.ServiceStackJWTExample.ServiceInterface/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/IdentityServer_aspcore/IdSvrHost/IdSvrHost.xproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 14.0
5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
6 |
7 |
8 |
9 | 154ccedc-cfd5-4b7a-9000-fc454ea86362
10 | IdSvrHost
11 | ..\..\artifacts\obj\$(MSBuildProjectName)
12 | ..\..\artifacts\bin\$(MSBuildProjectName)\
13 |
14 |
15 | 2.0
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/IdentityServer_aspcore/IdSvrHost/UI/Logout/LogoutController.cs:
--------------------------------------------------------------------------------
1 | using IdentityServer4.Core;
2 | using IdentityServer4.Core.Services;
3 | using Microsoft.AspNet.Mvc;
4 | using System.Linq;
5 | using System.Security.Claims;
6 | using System.Threading.Tasks;
7 |
8 | namespace IdSvrHost.UI.Logout
9 | {
10 | public class LogoutController : Controller
11 | {
12 | private readonly SignOutInteraction _signOutInteraction;
13 |
14 | public LogoutController(SignOutInteraction signOutInteraction)
15 | {
16 | _signOutInteraction = signOutInteraction;
17 | }
18 |
19 | [HttpGet(Constants.RoutePaths.Logout, Name = "Logout")]
20 | public IActionResult Index(string id)
21 | {
22 | return View(new LogoutViewModel { SignOutId = id });
23 | }
24 |
25 | [HttpPost(Constants.RoutePaths.Logout)]
26 | [ValidateAntiForgeryToken]
27 | public async Task Submit(string signOutId)
28 | {
29 | await HttpContext.Authentication.SignOutAsync(Constants.PrimaryAuthenticationType);
30 |
31 | // set this so UI rendering sees an anonymous user
32 | HttpContext.User = new ClaimsPrincipal(new ClaimsIdentity());
33 |
34 | var vm = new LoggedOutViewModel();
35 | return View("LoggedOut", vm);
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/ServiceStack/Punchcard.Angular1JWT/src/client/app/blocks/logger/logger.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | 'use strict';
3 |
4 | angular
5 | .module('blocks.logger')
6 | .factory('logger', logger);
7 |
8 | logger.$inject = ['$log', 'toastr'];
9 |
10 | function logger($log, toastr) {
11 | var service = {
12 | showToasts: true,
13 |
14 | error : error,
15 | info : info,
16 | success : success,
17 | warning : warning,
18 |
19 | // straight to console; bypass toastr
20 | log : $log.log
21 | };
22 |
23 | return service;
24 | /////////////////////
25 |
26 | function error(message, data, title) {
27 | toastr.error(message, title);
28 | $log.error('Error: ' + message, data);
29 | }
30 |
31 | function info(message, data, title) {
32 | toastr.info(message, title);
33 | $log.info('Info: ' + message, data);
34 | }
35 |
36 | function success(message, data, title) {
37 | toastr.success(message, title);
38 | $log.info('Success: ' + message, data);
39 | }
40 |
41 | function warning(message, data, title) {
42 | toastr.warning(message, title);
43 | $log.warn('Warning: ' + message, data);
44 | }
45 | }
46 | }());
47 |
--------------------------------------------------------------------------------
/ServiceStack/Punchcard.Angular1JWT/src/client/test/lib/bindPolyfill.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Phantom.js does not support Function.prototype.bind (at least not before v.2.0
3 | * That's just crazy. Everybody supports bind.
4 | * Read about it here: https://groups.google.com/forum/#!msg/phantomjs/r0hPOmnCUpc/uxusqsl2LNoJ
5 | * This polyfill is copied directly from MDN
6 | * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind#Compatibility
7 | */
8 | if (!Function.prototype.bind) {
9 | /*jshint freeze: false */
10 | Function.prototype.bind = function (oThis) {
11 | if (typeof this !== 'function') {
12 | // closest thing possible to the ECMAScript 5
13 | // internal IsCallable function
14 | throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
15 | }
16 |
17 | var aArgs = Array.prototype.slice.call(arguments, 1),
18 | fToBind = this,
19 | FuncNoOp = function () {},
20 | fBound = function () {
21 | return fToBind.apply(this instanceof FuncNoOp && oThis ? this : oThis,
22 | aArgs.concat(Array.prototype.slice.call(arguments)));
23 | };
24 |
25 | FuncNoOp.prototype = this.prototype;
26 | fBound.prototype = new FuncNoOp();
27 |
28 | return fBound;
29 | };
30 | }
31 |
--------------------------------------------------------------------------------
/ServiceStack/Punchard.ServiceStackJWTExample/Web.Debug.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
29 |
30 |
--------------------------------------------------------------------------------
/ServiceStack/Punchcard.Angular1JWT/src/client/test/midway/dataservice.spec.js:
--------------------------------------------------------------------------------
1 | describe('Midway: dataservice requests', function() {
2 | var dataservice;
3 | var tester;
4 |
5 | beforeEach(function() {
6 | if (tester) {
7 | tester.destroy();
8 | }
9 | tester = ngMidwayTester('app');
10 | });
11 |
12 | beforeEach(function() {
13 | dataservice = tester.inject('dataservice');
14 | expect(dataservice).not.to.equal(null);
15 | });
16 |
17 | describe('getAvengers function', function () {
18 | it('should return 7 Avengers', function (done) {
19 | dataservice.getAvengers().then(function(data) {
20 | expect(data).not.to.equal(null);
21 | expect(data.length).to.equal(7);
22 | done();
23 | });
24 | // $rootScope.$apply();
25 | });
26 |
27 | it('should contain Black Widow', function (done) {
28 | dataservice.getAvengers().then(function(data) {
29 | expect(data).not.to.equal(null);
30 | var hasBlackWidow = data.some(function isPrime(element, index, array) {
31 | return element.name.indexOf('Black Widow') >= 0;
32 | });
33 | expect(hasBlackWidow).to.be.true;
34 | done();
35 | });
36 | // $rootScope.$apply();
37 | });
38 | });
39 |
40 | });
--------------------------------------------------------------------------------
/ServiceStack/Punchcard.Angular1JWT/Web.Debug.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
29 |
30 |
--------------------------------------------------------------------------------
/ServiceStack/Punchcard.Angular1JWT/src/client/app/layout/shell.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | 'use strict';
3 |
4 | angular
5 | .module('app.layout')
6 | .controller('Shell', Shell);
7 |
8 | Shell.$inject = ['$timeout', 'config', 'logger', 'authService'];
9 |
10 | function Shell($timeout, config, logger, authService) {
11 | /*jshint validthis: true */
12 | var vm = this;
13 |
14 | vm.title = config.appTitle;
15 | vm.busyMessage = 'Please wait ...';
16 | vm.isBusy = true;
17 | vm.showSplash = true;
18 | //vm.userName = authService.OidcTokenManager().profile.name;
19 |
20 | activate();
21 |
22 | function activate() {
23 | logger.success(config.appTitle + ' loaded!', null);
24 | // Using a resolver on all routes or dataservice.ready in every controller
25 | // dataservice.ready().then(function(){
26 | // hideSplash();
27 | // });
28 | vm.mgr = authService.OidcTokenManager();
29 | if (vm.mgr.expired) {
30 | vm.mgr.redirectForToken();
31 | }
32 |
33 | hideSplash();
34 | }
35 |
36 | function hideSplash() {
37 | //Force a 1 second delay so we can see the splash.
38 | $timeout(function() {
39 | vm.showSplash = false;
40 | }, 1000);
41 | }
42 | }
43 | })();
44 |
--------------------------------------------------------------------------------
/ServiceStack/Punchcard.Angular1JWT/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "bitwise": true,
3 | "camelcase": true,
4 | "curly": true,
5 | "eqeqeq": true,
6 | "es3": false,
7 | "forin": true,
8 | "freeze": true,
9 | "immed": true,
10 | "indent": 4,
11 | "latedef": "nofunc",
12 | "newcap": true,
13 | "noarg": true,
14 | "noempty": true,
15 | "nonbsp": true,
16 | "nonew": true,
17 | "plusplus": false,
18 | "quotmark": "single",
19 | "undef": true,
20 | "unused": false,
21 | "strict": false,
22 | "maxparams": 10,
23 | "maxdepth": 5,
24 | "maxstatements": 40,
25 | "maxcomplexity": 8,
26 | "maxlen": 120,
27 |
28 | "asi": false,
29 | "boss": false,
30 | "debug": false,
31 | "eqnull": true,
32 | "esnext": false,
33 | "evil": false,
34 | "expr": false,
35 | "funcscope": false,
36 | "globalstrict": false,
37 | "iterator": false,
38 | "lastsemic": false,
39 | "laxbreak": false,
40 | "laxcomma": false,
41 | "loopfunc": true,
42 | "maxerr": false,
43 | "moz": false,
44 | "multistr": false,
45 | "notypeof": false,
46 | "proto": false,
47 | "scripturl": false,
48 | "shadow": false,
49 | "sub": true,
50 | "supernew": false,
51 | "validthis": false,
52 | "noyield": false,
53 |
54 | "browser": true,
55 | "node": true,
56 |
57 | "globals": {
58 | "angular": false,
59 | "$": false
60 | }
61 | }
--------------------------------------------------------------------------------
/ServiceStack/Punchard.ServiceStackJWTExample/Web.Release.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
19 |
30 |
31 |
--------------------------------------------------------------------------------
/ServiceStack/Punchcard.Angular1JWT/Web.Release.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
19 |
30 |
31 |
--------------------------------------------------------------------------------
/ServiceStack/Punchcard.Angular1JWT/src/client/test/midway/controller.spec.js:
--------------------------------------------------------------------------------
1 | //http://www.yearofmoo.com/2013/01/full-spectrum-testing-with-angularjs-and-karma.html
2 | //https://github.com/yearofmoo-articles/AngularJS-Testing-Article
3 | describe('Midway: controllers and routes', function() {
4 | var tester;
5 | beforeEach(function() {
6 | if (tester) {
7 | tester.destroy();
8 | }
9 | tester = ngMidwayTester('app');
10 | });
11 |
12 | beforeEach(function () {
13 | module('app', specHelper.fakeLogger);
14 | });
15 |
16 | it('should load the Avengers controller properly when /avengers route is accessed', function(done) {
17 | tester.visit('/avengers', function() {
18 | expect(tester.path()).to.equal('/avengers');
19 | var current = tester.inject('$route').current;
20 | var controller = current.controller;
21 | var scope = current.scope;
22 | expect(controller).to.equal('Avengers');
23 | done();
24 | });
25 | });
26 |
27 | it('should load the Dashboard controller properly when / route is accessed', function(done) {
28 | tester.visit('/', function() {
29 | expect(tester.path()).to.equal('/');
30 | var current = tester.inject('$route').current;
31 | var controller = current.controller;
32 | var scope = current.scope;
33 | expect(controller).to.equal('Dashboard');
34 | done();
35 | });
36 | });
37 |
38 | });
--------------------------------------------------------------------------------
/IdentityServer_aspcore/IdSvrHost/Configuration/Scopes.cs:
--------------------------------------------------------------------------------
1 | using IdentityServer4.Core.Models;
2 | using System.Collections.Generic;
3 |
4 | namespace IdSvrHost.Configuration
5 | {
6 | public class Scopes
7 | {
8 | public static IEnumerable Get()
9 | {
10 | return new List
11 | {
12 | StandardScopes.OpenId,
13 | StandardScopes.ProfileAlwaysInclude,
14 | StandardScopes.EmailAlwaysInclude,
15 | StandardScopes.OfflineAccess,
16 | StandardScopes.RolesAlwaysInclude,
17 |
18 | new Scope
19 | {
20 | Name = "api1",
21 | DisplayName = "API 1",
22 | Description = "API 1 features and data",
23 | Type = ScopeType.Resource,
24 |
25 | ScopeSecrets = new List
26 | {
27 | new Secret("secret".Sha256())
28 | },
29 | Claims = new List
30 | {
31 | new ScopeClaim("role")
32 | }
33 | },
34 | new Scope
35 | {
36 | Name = "api2",
37 | DisplayName = "API 2",
38 | Description = "API 2 features and data, which are better than API 1",
39 | Type = ScopeType.Resource
40 | }
41 | };
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/ServiceStack/Punchcard.Angular1JWT/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Punchcard.Angular1JWT")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Punchcard.Angular1JWT")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("4cfc2bc0-c0b0-4ac4-8dae-1fc4c22eff40")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Revision and Build Numbers
33 | // by using the '*' as shown below:
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/ServiceStack/Punchcard.Angular1JWT/src/client/app/widgets/ccWidgetMinimize.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | 'use strict';
3 |
4 | angular
5 | .module('app.widgets')
6 | .directive('ccWidgetMinimize', ccWidgetMinimize);
7 |
8 | /* @ngInject */
9 | function ccWidgetMinimize () {
10 | // Usage:
11 | //
12 | // Creates:
13 | //
14 | var directive = {
15 | link: link,
16 | template: '',
17 | restrict: 'A'
18 | };
19 | return directive;
20 |
21 | function link(scope, element, attrs) {
22 | //$('body').on('click', '.widget .wminimize', minimize);
23 | attrs.$set('href', '#');
24 | attrs.$set('wminimize');
25 | element.click(minimize);
26 |
27 | function minimize(e) {
28 | e.preventDefault();
29 | var $wcontent = element.parent().parent().next('.widget-content');
30 | var iElement = element.children('i');
31 | if ($wcontent.is(':visible')) {
32 | iElement.removeClass('fa fa-chevron-up');
33 | iElement.addClass('fa fa-chevron-down');
34 | } else {
35 | iElement.removeClass('fa fa-chevron-down');
36 | iElement.addClass('fa fa-chevron-up');
37 | }
38 | $wcontent.toggle(500);
39 | }
40 | }
41 | }
42 | })();
43 |
--------------------------------------------------------------------------------
/ServiceStack/Punchard.ServiceStackJWTExample/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Punchard.AngularServiceStack")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Punchard.AngularServiceStack")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("6b974b71-9b26-48dc-961f-3071afd7e297")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Revision and Build Numbers
33 | // by using the '*' as shown below:
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/ServiceStack/Punchcard.ServiceStackJWT/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Punchcard.ServiceStackJWT")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Punchcard.ServiceStackJWT")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("65782666-7e93-40ea-bdd3-e74c06ef93fa")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/ServiceStack/Punchcard.Angular1JWT/src/client/app/widgets/ccSidebar.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | 'use strict';
3 |
4 | angular
5 | .module('app.widgets')
6 | .directive('ccSidebar', ccSidebar);
7 |
8 | /* @ngInject */
9 | function ccSidebar () {
10 | // Opens and closes the sidebar menu.
11 | // Usage:
12 | //
13 | //
14 | // Creates:
15 | //