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.Http; | |
using System.Web.Http.SelfHost; | |
using Topshelf; | |
namespace MvcOnTopShelf | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
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 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); | |
} |
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
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqb3NlIjoiYWdsb2phbGUgY29uIGVsIDJuZCBmYWN0b3IgYXV0aGVudGlhdGlvbiBwYXDDoSwgamFqYSJ9.gFjJk4RVuNLzMD0y9Lr0qzgS9tqwMWuCeskmRiVOh8E |
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
public class SecuredActivity : CodeActivity | |
{ | |
[RequiredArgument] | |
public string Roles { get; set; } | |
protected override void Execute(CodeActivityContext context) | |
{ | |
EnforceSecurity(); | |
} |