0

I have setup ADFS to return the following claim: UseragreementAccepted: true/false

When I reach my MVC-application I want to inspect this claim, and if value==false I want to redirect the user to a completely different web-application where the user can read and accept the useragreement.

Where should I put this redirection-code in my MVC-application? Should I write a custom HttpHandler/Module, AuthenticationManager, AuthorizationManager, or something else..?

Application-flow:

https://mvcapp/
-> https://adfs/
-> https://mvcapp/ -> inspect claims -> 
-> if UseragreementAccepted==false, then redirect to https://accessapp/  
-> user can read useragreement and accept it
Thomas
  • 355
  • 1
  • 4
  • 17
  • Have you think about Application_Start() in global.asax? – Sid Jul 01 '14 at 13:11
  • @Sid - Application_Start() only runs once, when the worker process starts up. It's not involved in anything that a user performs. – Erik Funkenbusch Jul 01 '14 at 15:22
  • I also want to pack my logic in a NuGet-package to be reused by other MVC-applications. It is easier to add a handler to a configurationfile, than adding code/logic manually to global.asax or similar. I don't have any experience with AuthenticationMAnager and AuthorizationManager yet, so I'm not sure if this might be a better alternative than a HttpHandler/module, or if it will work at all (?) – Thomas Jul 01 '14 at 19:17

0 Answers0