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
/** | |
* ATS Promisfy node demo | |
* Steve Hobbs, July 2015 | |
* See associated package.json for package install | |
*/ | |
var chalk = require('chalk'); | |
var azure = require('azure-storage'); | |
var deferred = require('deferred'); |
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
IEnumerable<T> GetEnumOrder<T>() | |
{ | |
var type = typeof(T); | |
var tmp = new List<dynamic>(); | |
foreach (var value in Enum.GetValues(type)) | |
{ | |
var attr = type.GetMember(value.ToString())[0].GetCustomAttribute(typeof(DisplayAttribute), false) as DisplayAttribute; | |
tmp.Add(new |
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; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
namespace Filters | |
{ |
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.Web.Mvc; | |
using System.Web.Routing; | |
namespace Models | |
{ | |
public class RedirectToActionAnchor : RedirectToRouteResult | |
{ | |
/// <summary> | |
/// Gets or sets the action. |
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
const crypto = require('crypto') | |
const base64url = require('base64-url') | |
const encode = input => base64url.encode(input) | |
const header = JSON.stringify({ | |
alg: "HS256", | |
"typ": "JWT" | |
}) | |
const payload = JSON.stringify({ |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Test</title> | |
</head> | |
<body> | |
<button id="login">Log in</button> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Organizations Example</title> | |
</head> | |
<body> | |
<div> | |
<form id="init-form"> |
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
void main() { | |
final url = Auth0 | |
.webAuth('elkdanger.eu.auth0.com', '123') | |
.audience('test') | |
.buildUrl(); | |
print(url); | |
} | |
class WebAuth { |
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
void main() { | |
final auth0 = Auth0('elkdanger.eu.auth0.com', 'test'); | |
// Must wrap cascade in brackets to get return result | |
// of `start` | |
final result = (WebAuth(auth0) | |
..audience = 'test' | |
..orgId = 'test') | |
.start(); | |
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
// SPA JS-like | |
// Tries to implement pattern like: https://dart.academy/creational-design-patterns-for-dart-and-flutter-builder/ | |
void main() { | |
final client = Auth0WebClient( | |
domain: 'test', clientId: 'test', audience: 'test', issuer: 'test'); | |
client.loginWithRedirect(); | |
} |
OlderNewer