Package com.aspose.tasks
Class ProjectServerCredentials
- java.lang.Object
-
- com.aspose.tasks.ProjectServerCredentials
-
public final class ProjectServerCredentials extends Object
Credentials which are used to connect to Project Online or on-premise instance of Project Server.
-
-
Constructor Summary
Constructors Constructor Description ProjectServerCredentials(String siteUrl, String authToken)
Initializes a new instance of theProjectServerCredentials
class using URL of SharePoint site and valid SPOIDCRL authorization token for SharePoint's PWA (Project Web Access) site.ProjectServerCredentials(String siteUrl, String userName, String password)
Initializes a new instance of theProjectServerCredentials
class using URL of SharePoint site, user name and password.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAuthToken()
Gets the authorization token for the SharePoint instance.String
getSiteUrl()
Gets the URL of PWA at SharePoint site or URL of on-premise Project Server.String
getUserName()
Gets the user name for SharePoint site.String
toString()
Returns a string representation of this instance.
-
-
-
Constructor Detail
-
ProjectServerCredentials
public ProjectServerCredentials(String siteUrl, 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.- Parameters:
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.
-
ProjectServerCredentials
public ProjectServerCredentials(String siteUrl, String userName, String password)
Initializes a new instance of the
ProjectServerCredentials
class using URL of SharePoint site, user name and password.- Parameters:
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.
-
-
Method Detail
-
getAuthToken
public final String getAuthToken()
Gets the authorization token for the SharePoint instance.
- Returns:
- the authorization token for the SharePoint instance.
-
getSiteUrl
public final String getSiteUrl()
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";
- Returns:
- the URL of PWA at SharePoint site or URL of on-premise Project Server.
-
getUserName
public final String getUserName()
Gets the user name for SharePoint site.
- Returns:
- the user name for SharePoint site.
-
-