Exemplo n.º 1
0
        private ITokenGenerator CreateAuth(string granttype)
        {
            if (!_authTypes.ContainsKey(granttype.ToLower()))
            {
                throw new NotSupportedException("granttype");
            }
            ITokenGenerator tokenGenerator = (ITokenGenerator)Activator.CreateInstance(_authTypes[granttype.ToLower()]);

            tokenGenerator.DependOn(this.Context);
            return(tokenGenerator);
        }