FranklinChen / Single-Sign-On-Kata

a kata useful for understanding Test Doubles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Single Sign On Kata

Sometimes corporate security measures can really get out of hand. You log into your machine when you arrive in the morning, then log in again to your email client, then log in again to the corporate intranet, then log in again to your project file sharing area, then log in again ... Typing your password ten times before you can actually do anything gets pretty irritating. There are various ways to solve the problem, and in this Kata we're looking at one of them.

The way it works is the first time you log in to any service, you give your username and password, and the service validates these credentials against a central registry. The Single Sign On Registry then gives you a token. Then when you want to access a different service, you give it this token instead of having to type in your username and password again. The service can then check with the Single Sign On Registry whether the token is valid, and if it is, you get seamless access. If the Single Sign On Registry doesn't recognize your token, it will notify the service and your request will be denied.

For this Kata, your job is to develop a new service, that uses the Single Sign On registry. The actual functionality of the service is simple - it says "Hello Emily!" (or whatever your name is) if your single sign on token is valid.

The starting code here is the interface for the Single Sign On Registry.

Test Doubles

This kata is useful for practicing using different kinds of test doubles. I have used it as a worked example in my book "Mocks, Fakes and Stubs"

Credits

The original design of this Kata was by Fredrik Wendt and he published it on the codingdojo.org wiki

About

a kata useful for understanding Test Doubles

License:MIT License


Languages

Language:C++ 23.5%Language:C# 22.7%Language:CMake 12.1%Language:PHP 10.1%Language:Python 9.5%Language:Java 8.1%Language:TypeScript 6.3%Language:Scala 5.7%Language:JavaScript 1.9%