This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using CMS.Ecommerce; | |
using CMS.Helpers; | |
namespace CustomEProducts | |
{ | |
public static class CustomEProductManager | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
It seems that JIRA's 2-legged OAuth is actually 1-legged. | |
The tricky things about authenticating to JIRA via OAuth are: | |
* JIRA ignores the Authentication header in the request. All OAuth parameters must be in the query string | |
* The signature method is RSA-SHA1. JIRA does not accept HMAC-SHA1, which is the most commonly used | |
* The `oauth_token` parameter must be provided, simply as an empty string. If not provided, JIRA will ignore the OAuth parameters | |
Make sure you configure JIRA (https://developer.atlassian.com/jiradev/jira-apis/jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-oauth-authentication#JIRARESTAPIExample-OAuthauthentication-Step1:ConfiguringJIRA) | |
Only the linked step 1 is relevant. | |
Create a RSA-SHA1 public key and private key pair with, for example, `openssl`: |