GithubHelp home page GithubHelp logo

buildmaster / oauth-mvc.net Goto Github PK

View Code? Open in Web Editor NEW
79.0 9.0 29.0 5.37 MB

A library to help use OAuth with ASP.net MVC

Home Page: http://www.bgeek.net

License: Other

ASP 0.66% Objective-C 1.51% C 2.36% C# 26.74% JavaScript 68.73%

oauth-mvc.net's Introduction

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

oauth-mvc.net's People

Contributors

buildmaster avatar coldacid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oauth-mvc.net's Issues

Unit test failure - given_an_oauth_request_hasnt_set_a_www_auth_header.oauth_header_should_be_added

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, Action1 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

Unit test failure - given_an_oauth_request_sets_a_www_auth_header.oauth_header_should_be_added_to_existing_header

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, Action1 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

Unit test failure - get_query_string_parameters.should_return_decoded_paramter_values

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

Error running OAuth.MVC.Sample

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: }

Unit test failure - given_a_result_for_a_consumer_key_unknown_exception.oauth_header_should_be_set

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, Action1 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.