Skip to content
This repository was archived by the owner on Mar 20, 2019. It is now read-only.

Commit 1a9aa9d

Browse files
committed
user_xrds.aspx samples now utilize GetPublicFacingUrl method.
Fixes #199
1 parent 6c6c103 commit 1a9aa9d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

samples/OpenIdProviderWebForms/user_xrds.aspx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<%@ Page Language="C#" AutoEventWireup="true" ContentType="application/xrds+xml" %><?xml version="1.0" encoding="UTF-8"?>
2+
<%@ Import Namespace="DotNetOpenAuth.Messaging" %>
23
<%--
34
This page is a required as part of the service discovery phase of the openid
45
protocol (step 1). It simply renders the xml for doing service discovery of
@@ -13,12 +14,12 @@ This XRDS doc is discovered via the user.aspx page.
1314
<Service priority="10">
1415
<Type>http://specs.openid.net/auth/2.0/signon</Type>
1516
<Type>http://openid.net/extensions/sreg/1.1</Type>
16-
<URI><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/server.aspx"))%></URI>
17+
<URI><%=new Uri(new HttpRequestWrapper(Request).GetPublicFacingUrl(), Response.ApplyAppPathModifier("~/server.aspx"))%></URI>
1718
</Service>
1819
<Service priority="20">
1920
<Type>http://openid.net/signon/1.0</Type>
2021
<Type>http://openid.net/extensions/sreg/1.1</Type>
21-
<URI><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/server.aspx"))%></URI>
22+
<URI><%=new Uri(new HttpRequestWrapper(Request).GetPublicFacingUrl(), Response.ApplyAppPathModifier("~/server.aspx"))%></URI>
2223
</Service>
2324
</XRD>
2425
</xrds:XRDS>

samples/OpenIdWebRingSsoProvider/user_xrds.aspx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<%@ Page Language="C#" AutoEventWireup="true" ContentType="application/xrds+xml" %><?xml version="1.0" encoding="UTF-8"?>
2+
<%@ Import Namespace="DotNetOpenAuth.Messaging" %>
23
<%--
34
This page is a required as part of the service discovery phase of the openid
45
protocol (step 1). It simply renders the xml for doing service discovery of
@@ -13,12 +14,12 @@ This XRDS doc is discovered via the user.aspx page.
1314
<Service priority="10">
1415
<Type>http://specs.openid.net/auth/2.0/signon</Type>
1516
<Type>http://openid.net/extensions/sreg/1.1</Type>
16-
<URI><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/server.aspx"))%></URI>
17+
<URI><%=new Uri(new HttpRequestWrapper(Request).GetPublicFacingUrl(), Response.ApplyAppPathModifier("~/server.aspx"))%></URI>
1718
</Service>
1819
<Service priority="20">
1920
<Type>http://openid.net/signon/1.0</Type>
2021
<Type>http://openid.net/extensions/sreg/1.1</Type>
21-
<URI><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/server.aspx"))%></URI>
22+
<URI><%=new Uri(new HttpRequestWrapper(Request).GetPublicFacingUrl(), Response.ApplyAppPathModifier("~/server.aspx"))%></URI>
2223
</Service>
2324
</XRD>
2425
</xrds:XRDS>

0 commit comments

Comments
 (0)