zoukankan      html  css  js  c++  java
  • 2.1SignOutAuthenticationHandler【AuthenticationHandler、IAuthenticationSignOutHandler】

    using System.Text.Encodings.Web;
    using System.Threading.Tasks;
    using Microsoft.Extensions.Logging;
    using Microsoft.Extensions.Options;
    
    namespace Microsoft.AspNetCore.Authentication
    {
        /// <summary>
        /// Adds support for SignOutAsync
        /// </summary>
        public abstract class SignOutAuthenticationHandler<TOptions> : AuthenticationHandler<TOptions>, IAuthenticationSignOutHandler
            where TOptions : AuthenticationSchemeOptions, new()
        {
            /// <summary>
            /// Initializes a new instance of <see cref="SignOutAuthenticationHandler{TOptions}"/>.
            /// </summary>
            /// <param name="options">The monitor for the options instance.</param>
            /// <param name="logger">The <see cref="ILoggerFactory"/>.</param>
            /// <param name="encoder">The <see cref="UrlEncoder"/>.</param>
            /// <param name="clock">The <see cref="ISystemClock"/>.</param>
            public SignOutAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock)
            { }
    
            /// <inheritdoc/>
            public virtual Task SignOutAsync(AuthenticationProperties? properties)
            {
                var target = ResolveTarget(Options.ForwardSignOut);
                return (target != null)
                    ? Context.SignOutAsync(target, properties)
                    : HandleSignOutAsync(properties ?? new AuthenticationProperties());
            }
    
            /// <summary>
            /// Override this method to handle SignOut.
            /// </summary>
            /// <param name="properties"></param>
            protected abstract Task HandleSignOutAsync(AuthenticationProperties? properties);
        }
    }
  • 相关阅读:
    centos使用--排查服务是否可用
    centos使用--开机启动
    centos使用--防火墙
    centos使用--软件启动关闭等操作的命令
    centos使用--supervisor使用
    centos使用--centos7.3配置LNMP
    centos使用--vim配置和推荐插件使用
    centos使用--ssh登陆
    HTML5 sessionStorage会话存储
    localStorage使用
  • 原文地址:https://www.cnblogs.com/htlp/p/15256489.html
Copyright © 2011-2022 走看看