Comments (3)
It is very easy to do.
Method in UriUtil.cs:
/// <summary>
/// Uses absolute or relative uri.
/// </summary>
/// <param name="uri"></param>
/// <returns>String representing the uri</returns>
internal static string GetAbsoluteOrRelativeUri(this Uri uri)
{
if (uri.IsAbsoluteUri) return uri.AbsoluteUri;
else return uri.ToString();
}
DotNetOpenAuth\Messaging\Reflection\MessagePart.cs
pubilc MessagePart()
{
...
Map<Uri>(uri => uri.GetAbsoluteOrRelativeUri(), uri => uri.OriginalString, safeUri);
}
DotNetOpenAuth\OAuth2\Messages\EndUserAuthorizationRequest.cs
Remove check for absolute Uri.
protected override void EnsureValidMessage() {
...
// ErrorUtilities.VerifyProtocol(this.Callback == null || this.Callback.IsAbsoluteUri, this, OAuthStrings.AbsoluteUriRequired, Protocol.redirect_uri);
}
Same in other places.
from dotnetopenauth.
This requirement for absolute URIs is By Design. For several reasons, including security, absolute URLs are required by the OAuth spec.
Also, Uri.AbsoluteUri is not equivalent to Uri.ToString() (see http://blog.nerdbank.net/2008/04/uriabsoluteuri-and-uritostring-are-not.html) so it is not OK to just use the other one when a relative URL is detected.
You should simply create absolute URLs out of your relative ones before passing them to the library.
from dotnetopenauth.
I see.
Ok, I'll try to find workaround using absolute URI.
from dotnetopenauth.
Related Issues (20)
- No source/symbols for the latest stable version
- Pass additional field parameters in oAuth request header
- <reporting enabled="true"/> leaves other IIS applications unable to use IsolatedStorage HOT 1
- Using StandardAccessTokenAnalyzer with the symmetric ICryptoKeyStore in stable 4.3.4 NuGet package
- Missing Credit HOT 2
- DotNetOpenAuth locally work but publish on server not work HOT 2
- Facebook messaged me that the graph api 2.0 version this library uses will not be supported come August 2016 HOT 4
- Really not an issue
- New error: The OpenID Provider issued an assertion for an Identifier whose discovery information did not match.
- OpenIdWebRingSsoRelyingParty canot CreateRequest
- THIS REPOSITORY IS DEAD ! HOT 6
- How to use code to set whitelistHosts?
- Audience parameter
- FacebookApplication.VerifyAuthentication return null on Facebook HOT 7
- The invalid URI: URI string is too long HOT 1
- SSO doesn't for web accelerator between SSO sites
- Web request to failed. Remote party has closed the transport stream.
- Facebook strict OAuth redirection URIs HOT 1
- Access tokens are too long HOT 3
- do refresh_token has a lifetime?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotnetopenauth.