my own implementation of authorization server from microsoft sample code base