internal static CustomerIdentity GetUserFromEmailAddress(string emailaddress)
        {
            var identity = new CustomerIdentity("Claims");
            identity.AddClaim(new Claim("emailaddress", emailaddress));

            return identity;
        }
        public override async Task GrantResourceOwnerCredentials(OAuthGrantResourceOwnerCredentialsContext context)
        {
            const string emailaddress = "emailaddress";

            var identity = new CustomerIdentity(context.Options.AuthenticationType);

            identity.AddClaim(new Claim(emailaddress, context.UserName));


            context.Validated(new AuthenticationTicket(identity, null));
        }