Skip to content

class AssertionRequirement

cangjie
public class AssertionRequirement <: IAuthorizationHandler & IAuthorizationRequirement

功能:表示基于断言委托的授权要求。

父类型:

成员概览

成员功能
init((AuthorizationHandlerContext) -> Bool)创建一个断言授权要求。
prop handler获取授权断言委托。
func handle(AuthorizationHandlerContext)根据断言结果处理授权要求。
func toString()返回当前授权要求的描述字符串。

init((AuthorizationHandlerContext) -> Bool)

cangjie
public init(handler: (AuthorizationHandlerContext) -> Bool)

功能:创建一个断言授权要求。

参数:

prop handler

cangjie
public prop handler: (AuthorizationHandlerContext) -> Bool

功能:获取授权断言委托。

类型:(AuthorizationHandlerContext) -> Bool

func handle(AuthorizationHandlerContext)

cangjie
public func handle(context: AuthorizationHandlerContext): Unit

功能:根据断言结果处理授权要求。

参数:

返回值:

  • Unit

func toString()

cangjie
public func toString(): String

功能:返回当前授权要求的描述字符串。

返回值:

  • String - 当前授权要求的描述字符串。