Я создал плагин, используя
mvn archetype:generate -DarchetypeGroupId=com.atlassian.connect -DarchetypeArtifactId=atlassian-connect-spring-boot-archetype -DarchetypeVersion=1.5.1
Atlassian-connect.json
{...
"scopes": [
"read", "write"
],
"authentication": {
"type": "jwt"
},
"lifecycle": {
"installed": "/installed",
"uninstalled": "/uninstalled"
},
"enableLicensing": false,
"modules": {
"generalPages": [
{
"key": "comments",
"location": "system.top.navigation.bar",
"name": {
"value": "Comments"
},
"url": "/rest/api",
"conditions": [{
"condition": "user_is_logged_in"
}]
}
]
}
}
Я пытаюсь получить доступ к своему API
AJS.$.ajax({
url: "https://X.ngrok.io/rest/api",
type: "GET",
dataType: "json",
contentType: "application/json",
async: false, headers: {
'Authorization' : "JWT {{sessionToken}}"
},
success: function (data) {
console.log(e);
},
error: function(response) {
console.log(response);
}
})
Как получить jwt на стороне JS (лучше описать
простой плагин шаг за шагом, если вы могли (я проверил много ссылок с примерами, но ...))?