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 tagline 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).
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.
One of the great things that I love about being a developer is the in-jokes, the jokes which as a developer you laugh at because it’s sad how true they are. Things like XKCD and Dilbert always make me smile, everyone has seen XKCD (if not then you have my permission to stop reading and go spend a couple hours on the website, you can thank me later) I love these jokes which some people outside of development might not get.
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.