public string WsFederationMetadata() { var config = new EmbeddedTokenServiceConfiguration(); var uri = new Uri(Request.Url.AbsoluteUri).GetLeftPart(UriPartial.Authority); var claims = UserManager.GetAllUniqueClaimTypes(); return(config.GetFederationMetadata(uri, claims).ToString(SaveOptions.DisableFormatting)); }
private ActionResult ProcessSignIn(SignInRequestMessage signInMsg, ClaimsPrincipal user) { var config = new EmbeddedTokenServiceConfiguration(); var sts = config.CreateSecurityTokenService(); var appPath = Request.ApplicationPath; if (!appPath.EndsWith("/")) appPath += "/"; signInMsg.Reply = new Uri(Request.Url, appPath).AbsoluteUri; var response = FederatedPassiveSecurityTokenServiceOperations.ProcessSignInRequest(signInMsg, user, sts); var body = response.WriteFormPost(); return Html(body); }
private ActionResult ProcessSignIn(SignInRequestMessage signInMsg, ClaimsPrincipal user) { var config = new EmbeddedTokenServiceConfiguration(); var sts = config.CreateSecurityTokenService(); var appPath = Request.ApplicationPath; if (!appPath.EndsWith("/")) appPath += "/"; // when the reply querystringparameter has been specified, don't overrule it. if(String.IsNullOrEmpty(signInMsg.Reply)) signInMsg.Reply = new Uri(Request.Url, appPath).AbsoluteUri; var response = FederatedPassiveSecurityTokenServiceOperations.ProcessSignInRequest(signInMsg, user, sts); var body = response.WriteFormPost(); return Html(body); }
private ActionResult ProcessSignIn(SignInRequestMessage signInMsg, ClaimsPrincipal user) { var config = new EmbeddedTokenServiceConfiguration(); var sts = config.CreateSecurityTokenService(); var appPath = Request.ApplicationPath; if (!appPath.EndsWith("/")) { appPath += "/"; } signInMsg.Reply = new Uri(Request.Url, appPath).AbsoluteUri; var response = FederatedPassiveSecurityTokenServiceOperations.ProcessSignInRequest(signInMsg, user, sts); var body = response.WriteFormPost(); return(Html(body)); }
private ActionResult ProcessSignIn(SignInRequestMessage signInMsg, ClaimsPrincipal user) { var config = new EmbeddedTokenServiceConfiguration(); var sts = config.CreateSecurityTokenService(); var appPath = Request.ApplicationPath; if (!appPath.EndsWith("/")) { appPath += "/"; } // when the reply querystringparameter has been specified, don't overrule it. if (String.IsNullOrEmpty(signInMsg.Reply)) { signInMsg.Reply = new Uri(Request.Url, appPath).AbsoluteUri; } var response = FederatedPassiveSecurityTokenServiceOperations.ProcessSignInRequest(signInMsg, user, sts); var body = response.WriteFormPost(); return(Html(body)); }