Skip to content

Instantly share code, notes, and snippets.

View mauriciogentile's full-sized avatar

Mauricio Gentile mauriciogentile

  • Falls Church, VA
View GitHub Profile
@mauriciogentile
mauriciogentile / sample1.cs
Created October 9, 2012 02:33
Mvc Web API on TopShelf
using System;
using System.Web.Http;
using System.Web.Http.SelfHost;
using Topshelf;
namespace MvcOnTopShelf
{
class Program
{
static void Main(string[] args)
var rpc = require('amqp-rpc').factory({
url: ....
});
function runScript(authContext, nextCb) {
getScriptId(authContext.tenantId, function(scriptId)
rpc.call('worker@' + authContext.tenantId, { scriptId: user.tenantId, context: authContext }, function(result) {
if(result && result.success) {
nextCb(result.result, null);
}
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqb3NlIjoiYWdsb2phbGUgY29uIGVsIDJuZCBmYWN0b3IgYXV0aGVudGlhdGlvbiBwYXDDoSwgamFqYSJ9.gFjJk4RVuNLzMD0y9Lr0qzgS9tqwMWuCeskmRiVOh8E
public class SecuredActivity : CodeActivity
{
[RequiredArgument]
public string Roles { get; set; }
protected override void Execute(CodeActivityContext context)
{
EnforceSecurity();
}