// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Security.Claims; using Microsoft.AspNetCore.Http; using Newtonsoft.Json.Linq; namespace Microsoft.AspNetCore.Authentication.Twitter { /// /// Contains information about the login session as well as the user . /// public class TwitterCreatingTicketContext : ResultContext { /// /// Initializes a /// /// The HTTP environment /// The scheme data /// The options for Twitter /// The . /// The . /// Twitter user ID /// Twitter screen name /// Twitter access token /// Twitter access token secret /// User details public TwitterCreatingTicketContext( HttpContext context, AuthenticationScheme scheme, TwitterOptions options, ClaimsPrincipal principal, AuthenticationProperties properties, string userId, string screenName, string accessToken, string accessTokenSecret, JObject user) : base(context, scheme, options) { UserId = userId; ScreenName = screenName; AccessToken = accessToken; AccessTokenSecret = accessTokenSecret; User = user ?? new JObject(); Principal = principal; Properties = properties; } /// /// Gets the Twitter user ID /// public string UserId { get; } /// /// Gets the Twitter screen name /// public string ScreenName { get; } /// /// Gets the Twitter access token /// public string AccessToken { get; } /// /// Gets the Twitter access token secret /// public string AccessTokenSecret { get; } /// /// Gets the JSON-serialized user or an empty /// if it is not available. /// public JObject User { get; } } }