Connect to Jira with a Private Key (OAuth) using .NET

Kees C. Bakker
Jun 27 · 2 min read

Packages

Install-Package Atlassian.SDK
Install-Package OpenSSL.PrivateKeyDecoder

Getting the consumer secret

----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC0PIZ3R2ZPJuH0
lYJZShidrd7kwQtKUPR70ZwRzdchcII1lM98B7i9cSFUNzb511K9Bp9fMfAVwZ+U
HOiKTaZv8wi4XXLzjjJageUKHmFKOztRjeJB33bUspj+zlFRg1EkZSDTVraDz6iv
imj5tz1/1VL2/R81CCREFqKa0k2eEohQLecEeIMz7WITzLmbqTwULiLJZs028Hyb
eIoQVnbYE4YhIGGT50VWlEa4kXbh7Sof8gk6JnS1rP29raeNgr61tOXaO0/g141/
U7RleapyohfooLhNEiTEO3rd48wszrWGF4vWuRmTCOFW8cM6qLKb6EP3fCD0jLcJ
EKbgojghAgMBAAECggEAD4V41P577owRgGUnDQvG/pPnHTm3VbE5ZLetN5FLmgXH
iNgQXYTdYXRueNiqbi30t5zsOPVNe39+/8Z/i3gwFvWjMMayFrcOWgypTfZGIu+N
O7LleGPHUX4x6RuZFX/NYJN+61mignZtzJ7gTG+ofFZBfKNZaSaS157qu5Ip0gIZ
d9w4I2Q3eJBKoqHq/1NE7KTHv7KxKBYvsMqQLlkVrZItTj5EC/ffJ28EbSYR6hIY
GRJ1bM5ycvc2t0TIJh0d1VPMpazwFmF3M6eIdnBEluBjtq7C3AqcZwfOtnvQi4f7
igiObRExtgqEF+jZyUlSL43gcT29EEpAOT6YeMskmwKBgQD6MTR2mqHnzIkNya0o
tPDElt2IH0ZaYY0Whcg16c61MKbxAVvfyt4UaRwm/1Xh+97qyI/QmJR6+Zf8ijQj
1rlDW6krEZM33GTQeD/iQw8uxXAahN0LBzaxkMv8bmdKLV+zgk4ubdtTtHPIeQtl
yAQ/fwp+3chZzR9NG6aN7BuK5wKBgQC4a5mtosVPCVPetOtSR4M90bYpK04UOWW8
wIuoMplTDbVQaJDh76+IdQR+k8vhs1noE+bUPyV+r8RmkI1LfQheBaBR8dLmqN2Q
L0FLtL/g0EQ4WntjLhFRD8nr70MYyVV7iA6u5kOXgGvjxQXZv6Rzb5lFIvpCi4Nv
YNbYEPYLtwKBgQCF2Q8dKIrXjKgB1VQrA+oO8jsgGMM1lRy64OWEWko4ywd0xepV
5p06xCTIhC95D5tpddTins5IoAD8nR9Z0QUaEQ6GuQdOijzw/nQG4yNbPUtFFLGA
teI/ypwmtxXRLEcXrO2QjzsYI+ERbhh34jLLmXaO+q21xTQqt1E6egceHwKBgGtw
3I5pRvQ95evYkURVP2OzmqGvhgSIT/pAXty15deaI+jdkpLelfA05FJt/pjWaWmo
tpEu3MRK2Gw8iOTSyh4kvvsenJUfCj3nGe5mNmdeTnBaXoowm4wTW7sloHx/R1r5
sDw7EGPiQHjpHvh2CvPpr2y07QH5z7ACxggJEZ9PAoGBALdbNqiHJycRVizc1Qrn
A6sFLovEXsn9371w2l+SLrUeFlL73v0DKXWcRLz3RLcDGdq8gKMjIMCkdmX9lFPr
pK/+p6NMlLef8aSOxsDv4rxKNcSwcsfJ90tc4ex0JRN41zaAOcO7bOKUasNURgRS
Ki5GFciH4qixEtN7TxMi8lRF
-----END PRIVATE KEY-----

Make the HTTP Client behave


wehkamp-techblog

We'll try to keep up and post on the stuff we're doing and discovering. Interesting in working @wehkamp? Check out https://werkenbij.wehkamp.nl/

Kees C. Bakker

Written by

I work as a Lead Developer for one of the biggest web-shops in the Netherlands: wehkamp. I ❤️ C# and I like to solve nifty problems.

wehkamp-techblog

We'll try to keep up and post on the stuff we're doing and discovering. Interesting in working @wehkamp? Check out https://werkenbij.wehkamp.nl/