Skip to content

Fixed issue with authentication using API token and Powershell version 6+#209

Open
sebmaurer wants to merge 214 commits into
AtlassianPS:masterfrom
sebmaurer:master
Open

Fixed issue with authentication using API token and Powershell version 6+#209
sebmaurer wants to merge 214 commits into
AtlassianPS:masterfrom
sebmaurer:master

Conversation

@sebmaurer
Copy link
Copy Markdown

Description

Just a quickfix for authentication with Confluence via API token when using Powershell version 6+.
It is required by Microsoft Web-Request to provide the header "Token" with a secure string of the corresponding token.
Microsoft Web-Request does not expect a header named "PersonalAccessToken" therefore removed this before calling it.

Motivation and Context

closes #208

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • I have added Pester Tests that describe what my changes should do.
  • I have updated the documentation accordingly.

lipkau added 30 commits October 30, 2017 21:50
…oString

Overwrite ToString() method of custom classes
…OfCaptcha

Warn in case the server requires a captcha
IMPROVEMENTS:
  - Shows a warning when the server requires a CAPTCHA for the authentication (AtlassianPS#91, [@lipkau][])
  - Custom classes now print relevant data in `ToString()` (AtlassianPS#92, [@lipkau][])
* PowerShell is not setting the encoding to UTF-8 for application/json
* See PowerShell/PowerShell#5530
* Use Title as a parameter for the search instead of filtering the results
* Add parameter to use CQL to search for Page
…pportUnicode

Fix encoding of Invoke-WebRequest response
Add documentation of ConfluencePS classes
* System.Web assmebly is not available on PowerShell Core
Sync the submodule for ConfluencePS on the homapage repo everytime the CI finishes successfully
AtlassianPS/AtlassianPS.github.io#20
FreZZZeR and others added 28 commits May 10, 2020 23:13
Exclude page body from Get-Page and Get-ChildPage calls
…crease_id_range

Fix support for new cloud page ids by increase id range
Adding the Personal Access Token to Set-ConfluenceInfo
Converted this to a secure Token String for the web request
@sebmaurer
Copy link
Copy Markdown
Author

Personally I would also recommend using SecureString throughout the whole module for the API token because in my workaround this transformation only happens in the middle of execution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Authentication with API Token is not working

10 participants