Git Product home page Git Product logo

durandalauth's Introduction

What´s this?

A way to authenticate users using Durandal and token authentication with the new ASP.NET Identity membership.

The included features are:

  • Authentication and authorization using ASP.NET Identity 2 system and token authentication

  • Authorization in Durandal views

  • Model validation both client (knockout validation) and server (data attributes)

  • UnitOfWork and Repository patterns both client and server

  • Using Breeze JS in the client for better data management

  • pushState enabled

  • Styled with Bootstrap 3

  • Optionally, the site is ready for SEO using AzureCrawler

  • Dynamic Sitemap generation

##Check it out!! ...

... the sample site and play with it

##Weyland config

When you make changes over this project you are going to need to optimize the Durandal files, so remember, you have to install node and weyland

//install node and run this in your command line
npm install -g weyland
weyland build

Or you can follow this links:

Building with weyland

Automating builds with Visual Studio

##About SEO Optimization

The template is ready to be SEO crawlable. DurandalAuth implements the google ajax crawling scheme for pages without hash fragments. You need the default pushstate option enabled.

I created a interface (Helpers/ISnapshot.cs) that needs to be implemented in order to work.

The default implementation uses a new project I created called AzureCrawler

This new project is a Worker Role ready to be deployed to Windows Azure and serving a REST Web API via OWIN. The Web API executes a phantomjs process when receiving requests and returns html snapshots. Moreover, AzureCrawler can save the snapshot to Azure Storage and keep it there with the expiration date you choose, so next time the page is requested for any bot, the stored snapshot will be served.

I created AzureCrawler like a separate project but it´s easy to bring all the concepts from AzureCrawler to your own project if you want to keep it in the same solution. Another option is creating your own implementation of ISnapshot.cs.

Check durandalauth site at google:

site:durandalauth.azurewebsites.net

Another included feature, very useful for SEO, is the dynamic generation of sitemaps. If you browse to localhost:port/sitemap url an XML Sitemap will be rendered.

Include your own urls in the SitemapController and change the robots.txt for pointing to your own domain.

##Looking for the old version code

Check this branch if you are looking for the MVC 4 with SimpleMembership code.

durandalauth's People

Contributors

bryantlikes avatar drewfreyling avatar johnlantz avatar ryanwischkaemper avatar yagopv avatar

Stargazers

 avatar

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.