我用创建插件
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);
}
})
如何在JS端获得JWT(最好描述一下
简单的插件一步一步,如果可以的话(我用例子检查了很多链接,但是_))?