Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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