class HandleRequestResult
cangjie
public open class HandleRequestResult <: AuthenticateResult功能:表示请求处理阶段的身份验证结果。
父类型:
成员概览
| 成员 | 功能 |
|---|---|
| init(Bool, ?AuthenticationTicket, ?AuthenticationProperties, ?Exception, Bool, Bool) | 创建一个请求处理结果实例。 |
| func success(AuthenticationTicket) | 使用票据创建成功结果。 |
| func fail(Exception) | 使用异常创建失败结果。 |
| func fail(Exception, ?AuthenticationProperties) | 使用异常和属性创建失败结果。 |
| func fail(String) | 使用失败消息创建失败结果。 |
| func fail(String, ?AuthenticationProperties) | 使用失败消息和属性创建失败结果。 |
| func handle() | 创建已处理请求的结果。 |
| func skipHandler() | 创建跳过当前处理器的结果。 |
| func noResult() | 创建无结果的请求处理结果。 |
init(Bool, ?AuthenticationTicket, ?AuthenticationProperties, ?Exception, Bool, Bool)
cangjie
public HandleRequestResult(none!: Bool = false, ticket!: ?AuthenticationTicket = None,
properties!: ?AuthenticationProperties = None, failure!: ?Exception = None, skipped!: Bool = false,
handled!: Bool = false)功能:创建一个请求处理结果实例。
参数:
- none:
Bool- 是否表示无结果。 - ticket: ?AuthenticationTicket - 身份验证票据。
- properties: ?AuthenticationProperties - 附带的身份验证属性。
- failure:
?Exception- 失败异常。 - skipped:
Bool- 是否跳过当前处理器。 - handled:
Bool- 请求是否已被处理。
func success(AuthenticationTicket)
cangjie
public static func success(ticket: AuthenticationTicket): HandleRequestResult功能:使用票据创建成功结果。
参数:
- ticket: AuthenticationTicket - 身份验证票据。
返回值:
- HandleRequestResult - 成功的请求处理结果。
func fail(Exception)
cangjie
public static func fail(failure: Exception): HandleRequestResult功能:使用异常创建失败结果。
参数:
- failure:
Exception- 失败异常。
返回值:
- HandleRequestResult - 失败的请求处理结果。
func fail(Exception, ?AuthenticationProperties)
cangjie
public static func fail(failure: Exception, properties: ?AuthenticationProperties): HandleRequestResult功能:使用异常和属性创建失败结果。
参数:
- failure:
Exception- 失败异常。 - properties: ?AuthenticationProperties - 附带的身份验证属性。
返回值:
- HandleRequestResult - 失败的请求处理结果。
func fail(String)
cangjie
public static func fail(failureMessage: String): HandleRequestResult功能:使用失败消息创建失败结果。
参数:
- failureMessage:
String- 失败消息。
返回值:
- HandleRequestResult - 失败的请求处理结果。
func fail(String, ?AuthenticationProperties)
cangjie
public static func fail(failureMessage: String, properties: ?AuthenticationProperties): HandleRequestResult功能:使用失败消息和属性创建失败结果。
参数:
- failureMessage:
String- 失败消息。 - properties: ?AuthenticationProperties - 附带的身份验证属性。
返回值:
- HandleRequestResult - 失败的请求处理结果。
func handle()
cangjie
public static func handle(): HandleRequestResult功能:创建已处理请求的结果。
返回值:
- HandleRequestResult - 已处理请求的结果实例。
func skipHandler()
cangjie
public static func skipHandler(): HandleRequestResult功能:创建跳过当前处理器的结果。
返回值:
- HandleRequestResult - 跳过处理器的结果实例。
func noResult()
cangjie
public static func noResult(): HandleRequestResult功能:创建无结果的请求处理结果。
返回值:
- HandleRequestResult - 无结果的请求处理结果。