private JObject GenerateAccessTokenResponse(User user)
        {
            var tokenExpiration = TimeSpan.FromDays(1);

            AuthenticationTicket ticket = ApplicationOAuthProvider.GenerateAuthenticationTicket(user, this.UserManager);

            var accessToken = Startup.OAuthOptions.AccessTokenFormat.Protect(ticket);

            JObject tokenResponse = new JObject(
                new JProperty("userName", user.UserName),
                new JProperty("access_token", accessToken),
                new JProperty("token_type", "bearer"),
                new JProperty("expires_in", tokenExpiration.TotalSeconds.ToString()),
                new JProperty(".issued", ticket.Properties.IssuedUtc.ToString()),
                new JProperty(".expires", ticket.Properties.ExpiresUtc.ToString())
                );

            return(tokenResponse);
        }