-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Made Credential param optional to allow for bearer token authentication #439
Conversation
Hi matt. |
Hi Oliver, Thanks for taking a look at the pull request. I've made additions to the two documents you listed. Let me know if anything looks off or needs addressed. |
@lipkau Just wanted to check in and see if you had a moment to review my updates to the documentation. Thanks! |
@lipkau Just checking in since it has been a month since your last comment and I wanted to stay on top of this to address any issues you have. Thanks! |
Not sure, but i am still having trouble. I have verified that the PAT is working with the API using postman. However using the example code in the documentation:
I still get prompted for powershell get-credential, and no matter if I use my username/email addres or token for the password it still fails to authenticate. |
The -Credential parameter was made an optional parameter with this PR. @icsy7867 can you make sure you are running the latest version of the JiraPS module? |
Description
Made the Credential parameter optional for the New-JiraSession function. If the Credential parameter is passed, add it to the parameter splat to keep existing functionality.
Motivation and Context
It appears that using Personal Access Tokens (PATs) on Jira Server on-prem is not working as described in the official module documentation. The documentation states that you should be able to pass the email address and PAT into the username and password field respectively. However, this doesn't work in all cases. Removing the mandatory attribute on the Credential parameter for the New-JiraSession function allows us to take advantage of the Header parameter that is already available without the need to pass credentials and use basic authentication. Since the Header parameter is already there and works in New-JiraSession, with this new change we can now pass in custom headers that use the more widely available Bearer token method for authentication to the Jira REST API.
Types of changes
Checklist