// 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.Collections.Generic; using System.ComponentModel; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication.OAuth; using Microsoft.AspNetCore.Http.Authentication; namespace Microsoft.AspNetCore.Builder { /// /// Configuration options for . /// public class OAuthOptions : RemoteAuthenticationOptions { public OAuthOptions() { Events = new OAuthEvents(); } /// /// Gets or sets the provider-assigned client id. /// public string ClientId { get; set; } /// /// Gets or sets the provider-assigned client secret. /// public string ClientSecret { get; set; } /// /// Gets or sets the URI where the client will be redirected to authenticate. /// public string AuthorizationEndpoint { get; set; } /// /// Gets or sets the URI the middleware will access to exchange the OAuth token. /// public string TokenEndpoint { get; set; } /// /// Gets or sets the URI the middleware will access to obtain the user information. /// This value is not used in the default implementation, it is for use in custom implementations of /// IOAuthAuthenticationEvents.Authenticated or OAuthAuthenticationHandler.CreateTicketAsync. /// public string UserInformationEndpoint { get; set; } /// /// Gets or sets the used to handle authentication events. /// public new IOAuthEvents Events { get { return (IOAuthEvents)base.Events; } set { base.Events = value; } } /// /// Gets the list of permissions to request. /// public ICollection Scope { get; } = new HashSet(); /// /// Gets or sets the type used to secure data handled by the middleware. /// public ISecureDataFormat StateDataFormat { get; set; } } }