C# Class ServiceStack.RequiresAnyRoleAttribute

Inheritance: ServiceStack.AuthenticateAttribute
显示文件 Open project: nustack/ServiceStack

Public Methods

Method Description
AssertRequiredRoles ( IRequest request ) : void

Check all session is in any supplied roles otherwise a 401 HttpError is thrown

Execute ( IRequest req, IResponse res, object requestDto ) : void
HasAnyRoles ( IAuthSession session ) : bool
HasAnyRoles ( IRequest req, IAuthSession session, IAuthRepository userAuthRepo = null ) : bool
RequiresAnyRoleAttribute ( ) : System
RequiresAnyRoleAttribute ( ApplyTo applyTo ) : System

Method Details

AssertRequiredRoles() public static method

Check all session is in any supplied roles otherwise a 401 HttpError is thrown
public static AssertRequiredRoles ( IRequest request ) : void
request IRequest
return void

Execute() public method

public Execute ( IRequest req, IResponse res, object requestDto ) : void
req IRequest
res IResponse
requestDto object
return void

HasAnyRoles() public method

public HasAnyRoles ( IAuthSession session ) : bool
session IAuthSession
return bool

HasAnyRoles() public method

public HasAnyRoles ( IRequest req, IAuthSession session, IAuthRepository userAuthRepo = null ) : bool
req IRequest
session IAuthSession
userAuthRepo IAuthRepository
return bool

RequiresAnyRoleAttribute() public method

public RequiresAnyRoleAttribute ( ) : System
return System

RequiresAnyRoleAttribute() public method

public RequiresAnyRoleAttribute ( ApplyTo applyTo ) : System
applyTo ApplyTo
return System