It’s becoming more and more common for websites to provide the capability of having two factor authentication as part of you login process. Google, GitHub, Hotmail and Dropbox just to name a few of the organisations that have embraced two factor authentication and provided it as an optional security measure. In this article I will demonstrate how to implement two factor authentication in your ASP.NET MVC application using Google Authentication.
Sam Jenkins' Blog Posts
The Internet is full of bots. There’s no denying it, bots have been created to perform tasks on the Internet for many purposes, a good example is Ticketmaster, who have calculated that approximately 60% of all bookings are made by bots (src nyt).
One of the most common practices for fighting back against bots is by adding what is known as a ‘Completely Automated Public Turing test to tell Computers and Humans Apart’ or CAPTCHA for short. These are commonly either an image or audio clip with letters and numbers that the user has to type into the computer to prove that they are human. One of the most popular versions of the CAPTCHA is reCAPTCHA, which is provided free of charge by Google, this is what we will be using to add a CAPTCHA to our registration page, to avoid bots registering for our website.
If you’re developing a website where there should only be a couple of publicly accessible pages in ASP.NET MVC, then at first you may try to go through all your controllers decorating them with the AuthorizeAttribute. Although you will still want to allow anonymous users access to the login page otherwise anonymous users can never become logged in users, in MVC4 you can specify that you want to allow anonymous access to a particular action within a controller which requires the users be logged in by the decorating the actions that you want to be publicly accessible with the AllowAnonymousAttribute
What is Google Now
Google Now is an app that Google has had available for a couple months now, while there have been a lot of reviews out quickly about the list of features that are available I’ve left it for a bit to be able to try it out and use it properly for myself. The tag line that Google have given this new service is “The right information at just the right time”, which is pretty accurately described by Wikipedia as “an intelligent personal assistant developed by Google that is available within the Google Search mobile application for the Android and iOS operating systems. Google Now uses a natural language user interface to answer questions, make recommendations, and perform actions by delegating requests to a set of web services. Along with answering user-initiated queries, Google Now passively delivers information to the user that it predicts they will want, based on their search habits” (Source).
Google Now’s user interface is based on a card system, where a series of cards are shown to the user displaying different pieces of what Google considers to be relevant information for the user, each of these cards can be discarded, or selected to perform different actions, for example if the card is showing you directions, selecting it will bring up the apps map showing the directions with additional details.
So here are some of the highlights of what I have seen Google Now do;
Recently my old laptop started making some rather worrying noises like a chainsaw, now admittedly…
When this is posted I shall be travelling around Europe (I’ve set up delayed publish), while I’m away I will be getting my fix of the Internet through public wireless networks and networks in hostels. As any security conscious person will know public wireless networks are dangerous territory where unless your connections are secured it is possible for hackers to sniff your traffic or worse, so I am setting up VPN access on my Android phone and going to share it with you.
I admit it I go to Starbucks for coffee occasionally, I know I am a terrible person and I’m going to hell but it’s in my building and just so convenient when I am getting into work at 07:30 or something. On a more serious note one of the things that I like about Starbucks is their Android app, which is basically the combination of a gift card and a loyalty card, you can load up with money and then use it to pay at the counter. While this isn’t too much more work than getting out your wallet to pay I like the novelty of it as I think paying through your mobile is the way forward and that hasn’t really hit off in the UK just yet.
I recently bought Microsoft Office 2013 Professional for use at home, while I am not a fan of the hefty price tag associated with Microsoft Office I got a really good deal on it through the company I work for. I am quite a fan of Microsoft Outlook and despite looking there is no free alternative which matches it (sorry Mozilla Thunderbird fans but having my calendar integrated is important to me), which is the main reason for me purchasing it.
While I am a fan of Microsoft Outlook I am an Android user and like having my calendar events in Google Calendar so that it is all sync’d in one location. So what I wanted to be able to do is to view the events from my Google Calendar within Microsoft Outlook. While Outlook has the capability to sync up with your GMail account it doesn’t sync up with Google Calendar as easily, so I thought I would share the steps that you need to take in order to view your Google Calendar events from Outlook.
One of the great things that I love about being a developer is the in…
This is the first in a series of posts that I am going to make to update some of the existing code examples with newer code utilising what I’ve learnt since the original article. In this post I will be looking at shuffling the characters in a string, the original post “Shuffle a string in VB.Net” was written back in 2010 and I felt that I should be able to achieve the same thing through LINQ, which if you’ve seen much of my code you’ll know I’m a huge fan of LINQ.