C# Class ProjectFirma.Web.Controllers.WebServiceToken

ファイルを表示 Open project: sitkatech/projectfirma Class Usage Examples

Public Properties

Property Type Description
WebServiceTokenForParameterizedReplacements WebServiceToken
WebServiceTokenForUnitTests WebServiceToken
WebServiceTokenGuidForParameterizedReplacement Guid
WebServiceTokenGuidForUnitTests Guid

Public Methods

Method Description
DemandHasPermission ( FirmaBaseFeature feature ) : void

Throws an exception if the Person associated with this WebServiceToken does not have access to FirmaBaseFeature In a unit test using WebServiceTokenGuidForUnitTests this will always pass, and Person will return Stewart Gordon's person ID for now Might want to introduce a system person at some point.

ToString ( ) : string
WebServiceToken ( string allegedWebServiceToken ) : System

Private Methods

Method Description
DemandValidWebServiceToken ( string allegedWebServiceToken, bool isBeingCalledByStaticConstructor ) : Guid

Throws an exception if the string is not valid as a WebServiceToken

IsValidAsParameterizedReplacementToken ( Guid tokenGuidToCheck ) : bool

Indicates if the token is valid in these circumstances as a parameter replacement token, has to be the same GUID as WebServiceTokenGuidForParameterizedReplacement

IsValidAsUnitTestToken ( Guid tokenGuidToCheck, bool isBeingCalledByStaticConstructor ) : bool

Indicates if the token is valid in these circumstances as a unit test token, has to be the same GUID as WebServiceTokenGuidForUnitTests

WebServiceToken ( ) : System
WebServiceToken ( string allegedWebServiceToken, bool isBeingCalledByStaticConstructor ) : System

Method Details

DemandHasPermission() public method

Throws an exception if the Person associated with this WebServiceToken does not have access to FirmaBaseFeature In a unit test using WebServiceTokenGuidForUnitTests this will always pass, and Person will return Stewart Gordon's person ID for now Might want to introduce a system person at some point.
public DemandHasPermission ( FirmaBaseFeature feature ) : void
feature FirmaBaseFeature
return void

ToString() public method

public ToString ( ) : string
return string

WebServiceToken() public method

public WebServiceToken ( string allegedWebServiceToken ) : System
allegedWebServiceToken string
return System

Property Details

WebServiceTokenForParameterizedReplacements public_oe static_oe property

public static WebServiceToken,ProjectFirma.Web.Controllers WebServiceTokenForParameterizedReplacements
return WebServiceToken

WebServiceTokenForUnitTests public_oe static_oe property

The Unit Test GUID as a web service token
public static WebServiceToken,ProjectFirma.Web.Controllers WebServiceTokenForUnitTests
return WebServiceToken

WebServiceTokenGuidForParameterizedReplacement public_oe static_oe property

public static Guid WebServiceTokenGuidForParameterizedReplacement
return Guid

WebServiceTokenGuidForUnitTests public_oe static_oe property

The Unit Test GUID which can be used to make the web service token
public static Guid WebServiceTokenGuidForUnitTests
return Guid