Giter Site home page Giter Site logo

dotnetopenauth.webapi's Introduction

DotNetOpenAuth.WebAPI

DotNetOpenAuth for ASP.NET WebAPI (OpenID/OAuth/OAuth2)

Build status

Purpose

This project was developed to look into ways we can bring OAuth to the world of ASP.NET WebAPI.

Details

I have included the following in the source

DotNetOpenAuth.WebAPI

  • Code required for the magic to happen

DotNetOpenAuth.WebAPI.ClientSample

  • A sample client demonstrating communicating with a WebAPI resource via JavaScript as well as C#. Simply check/uncheck the checkbox to switch between the client modes

DotNetOpenAuth.WebAPI.HostSample

  • A sample authorisation server and WebAPI host utilising the functionality exposed in DotNetOpenAuth.WebAPI

Requirements

This sample uses Framework v4.5.1, MVC5 and requires SQL Express

Getting Started

  1. Launch the solution in visual studio
  2. Start debugging both the client and host sample projects
  3. Navigate to the Host sample (http://localhost:49810/)
  4. Ensure you have SQL Express installed and running
  5. Click the Create Database button
  6. Navigate to the client sample (http://localhost:18529/)
  7. Start clicking buttons and enjoy

Feedback

As always feedback is always welcome. Raise an issue if you have problems.

dotnetopenauth.webapi's People

Contributors

davidchristiansen avatar garymcallister avatar bryant1410 avatar

Stargazers

 avatar y、 avatar Venkatesh Kunchakuri avatar Gilles avatar Quan Bui avatar  avatar Mason avatar Troy Bland avatar Sean avatar  avatar hkang avatar  avatar Riddly avatar Mehdi Hadeli avatar Giorgos Michaelides avatar TNK_Hidy avatar peterwang avatar mj wang avatar Mehmet Can Kanpolat avatar 玫瑰之蓝色 avatar  avatar 有证程序员 avatar send2vinnie avatar wcoder.com avatar  avatar aortegadev avatar Henry Liu avatar Rodrigo Muñoz avatar  avatar  avatar  avatar Angus H. avatar  avatar Fredrik Berggren avatar  avatar  avatar  avatar nbboy avatar  avatar 王伟 avatar ywsbs avatar Manoj avatar  avatar Kevin Tseng avatar Paul Mcilreavy avatar GloomHu avatar Roosevelt Fernandes avatar glorwinger avatar Ali Özgür avatar Matt Houser avatar  avatar Min-Gyu Jo avatar  avatar LeonPan avatar Ziλ∀ avatar  avatar Kirk Chen avatar  avatar Maksymilian Majer avatar Joshua avatar José Augusto Guimarães avatar  avatar Fei avatar  avatar Brad Christie avatar Maximilian Fischer avatar olvani avatar Gui Ferreira avatar  avatar Heriyanto Binduni avatar  avatar Alex Sitnikov avatar Garrett Wolf avatar dita avatar Emerson Soares avatar robert dean avatar Justin Rusbatch avatar Alex Gadea avatar Dave Bouwman avatar Brad Jones avatar Scott Hanselman avatar Adam Larson avatar

Watchers

Brad Jones avatar Travis James avatar Tiernan OToole avatar send2vinnie avatar syklevin avatar James Cloos avatar  avatar James Cutts avatar Joey avatar nbboy avatar PeterZhu avatar Carlos Souto avatar Francesco Sasso avatar  avatar LeonPan avatar  avatar Javier Nájera avatar 王伟 avatar  avatar Venkatesh Kunchakuri avatar

dotnetopenauth.webapi's Issues

Hack to force string-comparisons to be done case-sensitivily.

I've read (parts of) your code, and I noticed the commend about case-sensetive checking only beeing to set in the db, however, I though I'd show you this little technique I use to achive the same with minimal overhead:

        CryptoKey ICryptoKeyStore.GetKey(string bucket, string handle)
        {
            // It is critical that this lookup be case-sensitive, which can only be configured at the database.
            var _db = SymetricCryptoKeys.Where(k => k.Bucket == bucket && k.Handle == handle).ToList();
            var matches = from key in _db // hack to make case-sensitive
                          where key.Bucket == bucket && key.Handle == handle
                          select new CryptoKey(key.Secret, key.ExpiresUtc.AsUtc());
            return matches.FirstOrDefault();
        }

Notice that the last itteration is done on in-memory objects, thus the comparison is done in C#, not in the db.

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.