I'm trying to use the Atlassian-supplied "OAuthTutorialClient" for Java, and cannot get the requestToken command to complete successfully against a BitBucket server. I have what I think is a working private key - I can git push from my local directory to the server successfully. However in code, when I execute this line:
String accessToken = jiraOAuthClient.getAccessToken(tmpToken, secret, properties.get(CONSUMER_KEY), properties.get(PRIVATE_KEY));
I get this error: "java.security.spec.InvalidKeySpecException: java.security.InvalidKeyException: invalid key format"
The CONSUMER_KEY value is "OauthKey", and the PRIVATE_KEY value starts and ends with this: "AAABABv1...PH7k2YA==" . Both of these values are stored in the config.properties file as per the sample code. Any thoughts would be welcome!
Hey Community! I work on the Bitbucket product marketing team. With Halloween approaching, we wanted to discuss a topic tailor-made for October: development horror stories. Whether it was a lurk...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events