Skip to content

Conversation

@sebmaurer
Copy link

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.

Converted this to a secure Token String for the web request
@sebmaurer
Copy link
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

1 participant