C# Class CrownPeakPublic.AccessAPI.AccessSession

Inheritance: IDisposable
ファイルを表示 Open project: Crownpeak/Access-API-Examples Class Usage Examples

Public Methods

Method Description
AccessSession ( string server, string instance, string username, string password, string apiKey, string apiSecret = "", bool requestCache = false ) : System

Starts a session for the user on the given server/instance. This in intended to be called with a using block. All AccessControllers used within will be automatically authenticated. The Dispose method will Logout the user when complete.

Dispose ( ) : void

Private Methods

Method Description
Authenticate ( bool withCache ) : void
Logout ( ) : void

Method Details

AccessSession() public method

Starts a session for the user on the given server/instance. This in intended to be called with a using block. All AccessControllers used within will be automatically authenticated. The Dispose method will Logout the user when complete.
public AccessSession ( string server, string instance, string username, string password, string apiKey, string apiSecret = "", bool requestCache = false ) : System
server string Domain of the server to use, ex: cms.crownpeak.com
instance string Name of the instance to use, ex: CPQA
username string Username of a user with active account in the CMS
password string Password of user
apiKey string Public developer API key supplied by CrownPeak
apiSecret string (Optional)Developer API Secret Key, ideally this will come from a secure database. Do not store key within application. Supplying a secret key will trigger Signature authentication method
requestCache bool (Optional)When set to true the Cache property will be populated with data that can be used to cache information that does not often change. Cache property will be null otherwise.
return System

Dispose() public method

public Dispose ( ) : void
return void