Aspose.Tasks for C++
|
Credentials which are used to connect to Project Online or on-premise instance of Project Server. More...
#include <ProjectServerCredentials.h>
Inherits System::Object.
Public Member Functions | |
System::String | get_SiteUrl () const |
Gets the URL of PWA at SharePoint site or URL of on-premise Project Server. For example, https://your_company_name.sharepoint.com/sites/pwa"; More... | |
System::String | get_AuthToken () const |
Gets the authorization token for the SharePoint instance. More... | |
System::String | get_UserName () const |
Gets the user name for SharePoint site. More... | |
ProjectServerCredentials (const System::String &siteUrl, const System::String &authToken) | |
Initializes a new instance of the ProjectServerCredentials class using URL of SharePoint site and valid SPOIDCRL authorization token for SharePoint's PWA (Project Web Access) site. More... | |
ProjectServerCredentials (const System::String &siteUrl, const System::String &userName, const System::String &password) | |
Initializes a new instance of the ProjectServerCredentials class using URL of SharePoint site, user name and password. More... | |
ProjectServerCredentials (const System::String &siteUrl, const System::SharedPtr< System::Net::NetworkCredential > &credentials) | |
Initializes a new instance of the ProjectServerCredentials class using URL of Project Web Access endpoint and network credentials. More... | |
System::String | ToString () const override |
Returns a string representation of this instance. More... | |
Aspose::Tasks::ProjectServerCredentials::ProjectServerCredentials | ( | const System::String & | siteUrl, |
const System::String & | authToken | ||
) |
Initializes a new instance of the ProjectServerCredentials class using URL of SharePoint site and valid SPOIDCRL authorization token for SharePoint's PWA (Project Web Access) site.
siteUrl | The URL of PWA (Project Web Access) API of Project Online. |
authToken | The authorization token (SPOIDCRL) for SharePoint's PWA (Project Web Access) site. |
Use this constructor to connect to ProjectOnline when you already have AuthToken for your SharePoint Online site.
Aspose::Tasks::ProjectServerCredentials::ProjectServerCredentials | ( | const System::String & | siteUrl, |
const System::String & | userName, | ||
const System::String & | password | ||
) |
Initializes a new instance of the ProjectServerCredentials class using URL of SharePoint site, user name and password.
siteUrl | The URL of PWA (Project Web Access) API of Project Online. |
userName | The user name for the SharePoint site. |
password | The password for the SharePoint site. |
Use this constructor to connect to ProjectOnline. Please note that legacy authentication should be enabled in your Azure portal and Office 365 Admin center.
Aspose::Tasks::ProjectServerCredentials::ProjectServerCredentials | ( | const System::String & | siteUrl, |
const System::SharedPtr< System::Net::NetworkCredential > & | credentials | ||
) |
Initializes a new instance of the ProjectServerCredentials class using URL of Project Web Access endpoint and network credentials.
siteUrl | The URL of project web access endpoint. |
credentials | The credentials used to login to Project Web Access endpoint. |
Use this constructor to connect to on-premise instance of Project Server via PWA.
In this example the instance of ProjectServerManager class is used to read a list of project from Project Server instance located at http://project_server_instance.local
System::String Aspose::Tasks::ProjectServerCredentials::get_AuthToken | ( | ) | const |
Gets the authorization token for the SharePoint instance.
System::String Aspose::Tasks::ProjectServerCredentials::get_SiteUrl | ( | ) | const |
Gets the URL of PWA at SharePoint site or URL of on-premise Project Server. For example, https://your_company_name.sharepoint.com/sites/pwa";
System::String Aspose::Tasks::ProjectServerCredentials::get_UserName | ( | ) | const |
Gets the user name for SharePoint site.
|
override |
Returns a string representation of this instance.