JamesRandall/AccidentalFish.AspNet.Identity.Azure — pull request #22 by akimbrel (2014-08-13 08:09:04+00:00)
Title: Fixed several things

I noticed that I couldn't use claims with a claim type of ClaimTypes.Role because it evaluates to "http://schemas.microsoft.com/ws/2008/06/identity/claims/role". The '/' character is not allowed in the keys and the claim type was being used as a key. I changed that key to use the base64 encoded value of the claim type instead. Unfortunately, the '/' character happens to be one of the two non alphanumeric characters that base64 encoding uses, so I also had to change the encoding extension to use '-' instead of '/'.

There were several other values that were being used as keys that could potentially contain illegal characters, so I applied the base64 encoding to those keys as well.

Another thing that I noticed was that when a user is deleted, all of the indices, claims, roles, and logins for the user are not deleted. I added some code to clean all of that up when a user is deleted.

The last thing is that when doing a replace, merge, or delete operation on a table, a valid ETag is required. The ETag will already be set if you get the object from a retrieve or query operation but if you try to create a new object, set it's keys, and then delete it, it wont work because the ETag isn't set. I added lines to set the ETag to a wildcard character before attempting to delete anything created this way.

I also integrated Amethi's fix for login indices.