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);
        }
    }
  • 相关阅读:
    Apache中Cookie长度的设置 414 request-uri too large apache
    URL中文参数,JSON转换,PHP赋值JS
    PHP通过JSON给JS赋值;JS通过JSON给PHP传值
    PHP限制上传文件大小
    PHP 类中使用全局变量和全局常量
    利用span设置文字固定宽度
    Linux用户管理
    DropZone(文件上传插件)
    rest_framework基础
    RESTful规范
  • 原文地址:https://www.cnblogs.com/htlp/p/15256489.html
Copyright © 2011-2022 走看看