AuthBridge.Protocols.OpenID.RelativeOpenIdHandler.ProcessSignInRequest C# (CSharp) Method

ProcessSignInRequest() public method

public ProcessSignInRequest ( Scope scope, System.Web.HttpContextBase httpContext ) : void
scope AuthBridge.Model.Scope
httpContext System.Web.HttpContextBase
return void
        public override void ProcessSignInRequest(Scope scope, HttpContextBase httpContext)
        {
            var site = new Uri(httpContext.Request.Url.GetComponents(UriComponents.SchemeAndServer, UriFormat.Unescaped));
            var issuerUrl = new Uri(site,
                new Uri(Issuer.Url.GetComponents(UriComponents.SchemeAndServer, UriFormat.Unescaped)).MakeRelativeUri(Issuer.Url));

            var replyUrl = new Uri(site,
                new Uri(MultiProtocolIssuer.ReplyUrl.GetComponents(UriComponents.SchemeAndServer, UriFormat.Unescaped)).MakeRelativeUri(MultiProtocolIssuer.ReplyUrl));

            var identifierUrl = new Uri(site,
                new Uri(MultiProtocolIssuer.Identifier.GetComponents(UriComponents.SchemeAndServer, UriFormat.Unescaped)).MakeRelativeUri(MultiProtocolIssuer.Identifier));

            Logger.Debug(string.Format("ProcessSignInRequest, Issuer.Url {0}, ReplyUrl {1}, Identifier {2}", issuerUrl, replyUrl, identifierUrl));
            var client = new Clients.RelativeOpenIdClient(issuerUrl, identifierUrl);

            Logger.InfoFormat("Status code: {0}", httpContext.Response.StatusCode);

            scope.Url = new Uri(site,
                new Uri(scope.Url.GetComponents(UriComponents.SchemeAndServer, UriFormat.Unescaped)).MakeRelativeUri(scope.Url));
            client.RequestAuthentication(httpContext, replyUrl);
        }