buildmaster / oauth-mvc.net Goto Github PK
View Code? Open in Web Editor NEWA library to help use OAuth with ASP.net MVC
Home Page: http://www.bgeek.net
License: Other
A library to help use OAuth with ASP.net MVC
Home Page: http://www.bgeek.net
License: Other
This project is work in progress, designed to allow you to turn and MS ASP.net MVC site into and OAuth Provider. Requires the use of Dependency Injection (Built for Ninject) Requires implementation of ITokenGenerator IAccessToken IRequestToken IOAuthRepository IConsumer See the sample for examples (the classes are in global.asax.cs) First published by Owen Evans, http://www.bgeek.net
given_an_oauth_request_hasnt_set_a_www_auth_header.oauth_header_should_be_added : FailedRhino.Mocks.Exceptions.ExpectationViolationException: HttpResponseBase.AddHeader("WWW-Authenticate", "OAuth Realm="http://testurl.com""); Expected #1, Actual #0.
at Rhino.Mocks.RhinoMocksExtensions.AssertWasCalled(T mock, Action1 action, Action
1 setupConstraints)
at Rhino.Mocks.RhinoMocksExtensions.AssertWasCalled(T mock, Action`1 action)
at OAuth.MVC.Tests.Filters.OAuthSecuredAttributeSpecifications.given_an_oauth_request_hasnt_set_a_www_auth_header.oauth_header_should_be_added() in OAuthSecuredAttributeSpecifications.cs: line 181
given_an_oauth_request_sets_a_www_auth_header.oauth_header_should_be_added_to_existing_header : FailedRhino.Mocks.Exceptions.ExpectationViolationException: HttpResponseBase.AddHeader(equal to WWW-Authenticate, equal to OAuth Realm="http://testurl.com"); Expected #1, Actual #0.
at Rhino.Mocks.RhinoMocksExtensions.AssertWasCalled(T mock, Action1 action, Action
1 setupConstraints)
at OAuth.MVC.Tests.Filters.OAuthSecuredAttributeSpecifications.given_an_oauth_request_sets_a_www_auth_header.oauth_header_should_be_added_to_existing_header() in OAuthSecuredAttributeSpecifications.cs: line 172
get_query_string_parameters.should_return_decoded_paramter_values : FailedSystem.ArgumentNullException: Value cannot be null.
Parameter name: str
at System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str)
at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path)
at System.Uri.ParseConfigFile(String file, ref IdnScopeFromConfig idnStateConfig, ref IriParsingFromConfig iriParsingConfig)
at System.Uri.GetConfig(ref UriIdnScope idnScope, ref Boolean iriParsing)
at System.Uri.InitializeUriConfig()
at System.Uri.InitializeUri(ParsingError err, UriKind uriKind, ref UriFormatException e)
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at System.Uri..ctor(String uriString)
at OAuth.Web.Tests.OAuthWebRequestSignerSpecifications.get_query_string_parameters.should_return_decoded_paramter_values() in OAuthWebRequestSignerSpecifications.cs: line 381
Looks like you might have forgot to check in a controller? This occurs when running OAuth.MVC.Sample from source (VS 2010):
The IControllerFactory 'Ninject.Web.Mvc.NinjectControllerFactory' did not return a controller for the name 'SignIn'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The IControllerFactory 'Ninject.Web.Mvc.NinjectControllerFactory' did not return a controller for the name 'SignIn'.
Source Error:
Line 11: HttpContext.Current.RewritePath(Request.ApplicationPath, false);
Line 12: IHttpHandler httpHandler = new MvcHttpHandler();
Line 13: httpHandler.ProcessRequest(HttpContext.Current);
Line 14: }
Line 15: }
given_a_result_for_a_consumer_key_unknown_exception.oauth_header_should_be_set : FailedRhino.Mocks.Exceptions.ExpectationViolationException: HttpResponseBase.AddHeader("WWW-Authenticate", "OAuth Realm="http://testauth.com""); Expected #1, Actual #0.
at Rhino.Mocks.RhinoMocksExtensions.AssertWasCalled(T mock, Action1 action, Action
1 setupConstraints)
at Rhino.Mocks.RhinoMocksExtensions.AssertWasCalled(T mock, Action`1 action)
at OAuth.MVC.Tests.Results.OAuthExceptionResultSpecifications.given_a_result_for_a_consumer_key_unknown_exception.oauth_header_should_be_set() in OAuthExceptionResultSpecifications.cs: line 89
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.