C# Class WebApi.Middlewares.ApiAuthorizedMiddleware

显示文件 Open project: hwqdt/Demos

Public Methods

Method Description
ApiAuthorizedMiddleware ( RequestDelegate next, IOptions options ) : Common
Invoke ( HttpContext context ) : Task

Private Methods

Method Description
Check ( HttpContext context, RequestInfo requestInfo ) : Task

the main check method

CheckApplication ( HttpContext context, string applicationId, string applicationPassword ) : Task

check the application

CheckExpiredTime ( double timestamp, double expiredSecond ) : bool

check the expired time

GetAllApplications ( ) : IList

return the application infomations

GetInvoke ( HttpContext context ) : Task

http get invoke

PostInvoke ( HttpContext context ) : Task

http post invoke

ReturnNoAuthorized ( HttpContext context ) : Task

not authorized request

ReturnTimeOut ( HttpContext context ) : Task

timeout request

Method Details

ApiAuthorizedMiddleware() public method

public ApiAuthorizedMiddleware ( RequestDelegate next, IOptions options ) : Common
next RequestDelegate
options IOptions
return Common

Invoke() public method

public Invoke ( HttpContext context ) : Task
context HttpContext
return Task