Created
July 4, 2012 09:02
-
-
Save tugberkugurlu/3046216 to your computer and use it in GitHub Desktop.
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 Global : System.Web.HttpApplication { | |
protected void Application_Start(object sender, EventArgs e) { | |
GlobalHost.Something.Add(new TheThingsThatRunsOnEverRequestBeforeHubs()); | |
} | |
} |
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
//Just like Web API message handlers | |
public class TheThingThatRunsOnEverRequestBeforeHubs : Something { | |
public Task Execute(SomeSortofRequestContext context) { | |
//I would like to do something here as in Web API message handlers | |
//For example, I want to see if the user has the right auth credintials or not. | |
//if so, I would like to populate the CurrentPrincipal. | |
//if not, I would like to send back an unauth response | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment