com.aspose.tasks

Interfaces

Classes

Exceptions

com.aspose.tasks

Class ProjectServerCredentials



  • public final class ProjectServerCredentials
    extends Object

    Credentials which are used to connect to Project Online or on-premise instance of Project Server.

    • Constructor Detail

      • ProjectServerCredentials

        public ProjectServerCredentials(String siteUrl,
                                        String authToken)

        Initializes a new instance of the ProjectServerCredentials class using URL of SharePoint site and valid authorization token for SharePoint site.

        Parameters:
        siteUrl - The URL of PWA (Project Web Access) API of Project Online.
        authToken - The authorization token for SharePoint site.


        Use this constructor to connect to ProjectOnline when you already have AuthToken for your SharePoint 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.
    • 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.
      • toString

        public String toString()

        Returns a string representation of this instance.

        Overrides:
        toString in class Object
        Returns:
        a string representation of this instance.