diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2008-11-08 09:36:06 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2008-11-08 09:36:50 -0800 |
commit | c94e98755ff12b41f9ab70a8218d6e1f80164721 (patch) | |
tree | 5da30728d14449efe51da7b49667412f596a3085 | |
parent | d9771cf50c68b0c5bcd32b1a45072808b3ab829b (diff) | |
download | DotNetOpenAuth-c94e98755ff12b41f9ab70a8218d6e1f80164721.zip DotNetOpenAuth-c94e98755ff12b41f9ab70a8218d6e1f80164721.tar.gz DotNetOpenAuth-c94e98755ff12b41f9ab70a8218d6e1f80164721.tar.bz2 |
Added warning so OPs using DNOI are aware that they may be breaking URL delegation.
-rw-r--r-- | src/DotNetOpenId/Provider/CheckIdRequest.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/DotNetOpenId/Provider/CheckIdRequest.cs b/src/DotNetOpenId/Provider/CheckIdRequest.cs index ec6087b..7795dd8 100644 --- a/src/DotNetOpenId/Provider/CheckIdRequest.cs +++ b/src/DotNetOpenId/Provider/CheckIdRequest.cs @@ -124,6 +124,15 @@ namespace DotNetOpenId.Provider { }
localIdentifier = value;
+ } else {
+ // Help warn the Provider if they are inadvertently breaking URL delegation
+ UriIdentifier oldUriClaimedIdentifier = claimedIdentifier as UriIdentifier;
+ if (oldUriClaimedIdentifier != null) {
+ UriIdentifier newUriClaimedIdentifier = value as UriIdentifier;
+ if (newUriClaimedIdentifier == null || !string.Equals(oldUriClaimedIdentifier.Uri.Host, newUriClaimedIdentifier.Uri.Host, StringComparison.OrdinalIgnoreCase)) {
+ Logger.WarnFormat("Changing the Claimed Identifier from {0} to {1} may be breaking OpenID URL delegation. Consider normalizing the ClaimedIdentifier at the identity page using redirects, or by setting the ClaimedIdentifier in the assertion only if the hostname of the old and new claimed identifiers are the same.", claimedIdentifier, value);
+ }
+ }
}
claimedIdentifier = value;
|