Package org.azd.authentication
Class PersonalAccessTokenCredential
java.lang.Object
org.azd.authentication.PersonalAccessTokenCredential
- All Implemented Interfaces:
AccessTokenCredential
Represents personal access token authentication model.
- See Also:
-
Constructor Summary
ConstructorDescriptionPersonalAccessTokenCredential
(String organizationUrl, String personalAccessToken) Creates a new Personal access token credential provider object.PersonalAccessTokenCredential
(String organizationUrl, String projectName, String personalAccessToken) Creates a new Personal access token credential provider object. -
Method Summary
Modifier and TypeMethodDescriptionGets the personal access token.Gets the organization or tfs collection name.Gets the project name.void
setAccessToken
(String accessToken) Sets the personal access token.void
setOrganizationUrl
(String organizationUrl) Sets the organization or tfs collection name.void
setProjectName
(String projectName) Sets the project name.
-
Constructor Details
-
PersonalAccessTokenCredential
Creates a new Personal access token credential provider object.- Parameters:
organizationUrl
- Azure DevOps organization url.personalAccessToken
- Personal access token.
-
PersonalAccessTokenCredential
public PersonalAccessTokenCredential(String organizationUrl, String projectName, String personalAccessToken) Creates a new Personal access token credential provider object.- Parameters:
organizationUrl
- Azure DevOps organization url.projectName
- Pass the project namepersonalAccessToken
- Personal access token.
-
-
Method Details
-
getAccessToken
Gets the personal access token.- Specified by:
getAccessToken
in interfaceAccessTokenCredential
- Returns:
- Personal access token.
-
setAccessToken
Sets the personal access token.- Specified by:
setAccessToken
in interfaceAccessTokenCredential
- Parameters:
accessToken
- Personal access token.
-
getOrganizationUrl
Gets the organization or tfs collection name.- Specified by:
getOrganizationUrl
in interfaceAccessTokenCredential
- Returns:
- Organization name.
-
setOrganizationUrl
Sets the organization or tfs collection name.- Specified by:
setOrganizationUrl
in interfaceAccessTokenCredential
- Parameters:
organizationUrl
- Azure DevOps organization or TFS collection url.
-
getProjectName
Gets the project name.- Specified by:
getProjectName
in interfaceAccessTokenCredential
- Returns:
- Project name.
-
setProjectName
Sets the project name.- Specified by:
setProjectName
in interfaceAccessTokenCredential
- Parameters:
projectName
- Pass the project name.
-