// 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.ComponentModel; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication.Twitter; using Microsoft.AspNetCore.Http; namespace Microsoft.AspNetCore.Builder { /// /// Options for the Twitter authentication middleware. /// public class TwitterOptions : RemoteAuthenticationOptions { /// /// Initializes a new instance of the class. /// public TwitterOptions() { AuthenticationScheme = TwitterDefaults.AuthenticationScheme; DisplayName = AuthenticationScheme; CallbackPath = new PathString("/signin-twitter"); BackchannelTimeout = TimeSpan.FromSeconds(60); Events = new TwitterEvents(); } /// /// Gets or sets the consumer key used to communicate with Twitter. /// /// The consumer key used to communicate with Twitter. public string ConsumerKey { get; set; } /// /// Gets or sets the consumer secret used to sign requests to Twitter. /// /// The consumer secret used to sign requests to Twitter. public string ConsumerSecret { get; set; } /// /// Gets or sets the type used to secure data handled by the middleware. /// public ISecureDataFormat StateDataFormat { get; set; } /// /// Gets or sets the used to handle authentication events. /// public new ITwitterEvents Events { get { return (ITwitterEvents)base.Events; } set { base.Events = value; } } /// /// For testing purposes only. /// [EditorBrowsable(EditorBrowsableState.Never)] public ISystemClock SystemClock { get; set; } = new SystemClock(); } }