Skip to content

interface IAuthenticationHandler

cangjie
public interface IAuthenticationHandler

功能:定义身份验证处理器的基础能力。

成员概览

成员功能
func initialize(AuthenticationScheme, HttpContext)使用当前方案和请求上下文初始化处理器。
func authenticate()执行身份验证。
func challenge(?AuthenticationProperties)触发质询流程。
func forbid(?AuthenticationProperties)触发禁止访问流程。

func initialize(AuthenticationScheme, HttpContext)

cangjie
func initialize(scheme: AuthenticationScheme, context: HttpContext): Unit

功能:使用当前方案和请求上下文初始化处理器。

参数:

返回值:

  • Unit

func authenticate()

cangjie
func authenticate(): AuthenticateResult

功能:执行身份验证。

返回值:

func challenge(?AuthenticationProperties)

cangjie
func challenge(properties: ?AuthenticationProperties): Unit

功能:触发质询流程。

参数:

返回值:

  • Unit

func forbid(?AuthenticationProperties)

cangjie
func forbid(properties: ?AuthenticationProperties): Unit

功能:触发禁止访问流程。

参数:

返回值:

  • Unit